diff --git a/Cargo.toml b/Cargo.toml index 069b40c2d2..573fb1389d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,10 @@ serde-value = "0.6.x" url = "1.7.x" [features] +default = ["api"] + +api = [] # Enables API operation functions and response types. If disabled, only the resource types will be exported. + # Each feature corresponds to a supported version of Kubernetes v1_8 = [] v1_9 = [] diff --git a/k8s-openapi-codegen-common/src/lib.rs b/k8s-openapi-codegen-common/src/lib.rs index c84918a873..58290a103b 100644 --- a/k8s-openapi-codegen-common/src/lib.rs +++ b/k8s-openapi-codegen-common/src/lib.rs @@ -1590,6 +1590,10 @@ pub fn write_operation( } } + if mod_root.is_some() { + writeln!(out, r#"{}#[cfg(feature = "api")]"#, indent)?; + } + writeln!(out, "{}{}fn {}(", indent, vis, operation_fn_name)?; for (parameter_name, parameter_type, _) in &required_parameters { writeln!(out, "{} {}: {},", indent, parameter_name, parameter_type)?; @@ -1787,6 +1791,9 @@ pub fn write_operation( writeln!(out, "/// Optional parameters of [`{}`]", operation_fn_name)?; } + if mod_root.is_some() { + writeln!(out, r#"#[cfg(feature = "api")]"#)?; + } writeln!(out, "#[derive(Clone, Copy, Debug, Default)]")?; write!(out, "{}struct {}", vis, operation_optional_parameters_name)?; if any_optional_fields_have_lifetimes { @@ -1825,6 +1832,9 @@ pub fn write_operation( operation_result_name, operation_fn_name)?; } + if mod_root.is_some() { + writeln!(out, r#"#[cfg(feature = "api")]"#)?; + } writeln!(out, "#[derive(Debug)]")?; writeln!(out, "{}enum {} {{", vis, operation_result_name)?; @@ -1874,6 +1884,9 @@ pub fn write_operation( writeln!(out, "}}")?; writeln!(out)?; + if mod_root.is_some() { + writeln!(out, r#"#[cfg(feature = "api")]"#)?; + } writeln!(out, "impl {}::Response for {} {{", crate_root, operation_result_name)?; writeln!(out, " fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), {}::ResponseError> {{", crate_root)?; diff --git a/k8s-openapi-codegen/src/main.rs b/k8s-openapi-codegen/src/main.rs index d5d0af18ef..e7f34a84e3 100644 --- a/k8s-openapi-codegen/src/main.rs +++ b/k8s-openapi-codegen/src/main.rs @@ -149,7 +149,7 @@ fn run(supported_version: supported_version::SupportedVersion, out_dir_base: &st for definition_path in spec.definitions.keys() { log::trace!("Working on {} ...", definition_path); - let parent_mod_rs_file = std::cell::RefCell::new(None); + let parent_mod_rs_file_and_mod_name = std::cell::RefCell::new(None); let run_result = k8s_openapi_codegen_common::run( &spec.definitions, @@ -200,26 +200,34 @@ fn run(supported_version: supported_version::SupportedVersion, out_dir_base: &st let mut parent_mod_rs = std::io::BufWriter::new(std::fs::OpenOptions::new().append(true).create(true).open(current.join("mod.rs"))?); writeln!(parent_mod_rs)?; writeln!(parent_mod_rs, "mod {};", mod_name)?; - writeln!(parent_mod_rs, "pub use self::{}::{{", mod_name)?; - writeln!(parent_mod_rs, " {},", type_name)?; - - parent_mod_rs_file.replace(Some(parent_mod_rs)); + writeln!(parent_mod_rs, "pub use self::{}::{};", mod_name, type_name)?; let file_name = current.join(&*mod_name).with_extension("rs"); let file = std::io::BufWriter::new(std::fs::File::create(file_name)?); + parent_mod_rs_file_and_mod_name.replace(Some((parent_mod_rs, mod_name))); + Ok(file) }, |operation_optional_parameters_name, operation_result_name| { - let mut parent_mod_rs = parent_mod_rs_file.borrow_mut(); - let parent_mod_rs = parent_mod_rs.as_mut().unwrap(); + let mut parent_mod_rs_file_and_mod_name = parent_mod_rs_file_and_mod_name.borrow_mut(); + let (parent_mod_rs, mod_name) = parent_mod_rs_file_and_mod_name.as_mut().unwrap(); match (operation_optional_parameters_name, operation_result_name) { (Some(operation_optional_parameters_name), Some(operation_result_name)) => - writeln!(parent_mod_rs, " {}, {},", operation_optional_parameters_name, operation_result_name)?, + writeln!( + parent_mod_rs, + r#"#[cfg(feature = "api")] pub use self::{}::{{{}, {}}};"#, + mod_name, operation_optional_parameters_name, operation_result_name)?, (Some(operation_optional_parameters_name), None) => - writeln!(parent_mod_rs, " {},", operation_optional_parameters_name)?, + writeln!( + parent_mod_rs, + r#"#[cfg(feature = "api")] pub use self::{}::{};"#, + mod_name, operation_optional_parameters_name)?, (None, Some(operation_result_name)) => - writeln!(parent_mod_rs, " {},", operation_result_name)?, + writeln!( + parent_mod_rs, + r#"#[cfg(feature = "api")] pub use self::{}::{};"#, + mod_name, operation_result_name)?, (None, None) => (), } @@ -227,10 +235,6 @@ fn run(supported_version: supported_version::SupportedVersion, out_dir_base: &st }, )?; - let mut parent_mod_rs = parent_mod_rs_file.borrow_mut(); - let parent_mod_rs = parent_mod_rs.as_mut().unwrap(); - writeln!(parent_mod_rs, "}};")?; - num_generated_structs += run_result.num_generated_structs; num_generated_type_aliases += run_result.num_generated_type_aliases; num_generated_apis += run_result.num_generated_apis; diff --git a/src/lib.rs b/src/lib.rs index af5a75ec9b..fc796f9024 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -266,6 +266,17 @@ //! } //! ``` //! +//! +//! # Crate features +//! +//! - As mentioned above, enabling one of the `v1_*` features selects which version of the Kubernetes API server this crate should target. +//! +//! - If the `api` feature is disabled, the library will only contain the resource types like [`api::core::v1::Pod`] and not the associated operation functions +//! like [`api::core::v1::Pod::read_namespaced_pod`]. The corresponding `Response` and `Optional` types will also not be accessible. +//! +//! This feature is enabled by default, but can be disabled if your crate does not need the operation functions to save on compile time and resources. +//! +//! //! # Custom resource definitions //! //! The [`k8s-openapi-derive` crate](https://crates.io/crates/k8s-openapi-derive) provides a custom derive for generating clientsets diff --git a/src/v1_10/api/admissionregistration/v1alpha1/initializer_configuration.rs b/src/v1_10/api/admissionregistration/v1alpha1/initializer_configuration.rs index 8ed6b4be10..8dbffad54f 100644 --- a/src/v1_10/api/admissionregistration/v1alpha1/initializer_configuration.rs +++ b/src/v1_10/api/admissionregistration/v1alpha1/initializer_configuration.rs @@ -26,6 +26,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_initializer_configuration( body: &crate::v1_10::api::admissionregistration::v1alpha1::InitializerConfiguration, optional: CreateInitializerConfigurationOptional<'_>, @@ -51,6 +52,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateInitializerConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreateInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateInitializerConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1alpha1::InitializerConfiguration), @@ -66,6 +69,7 @@ pub enum CreateInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl InitializerConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_initializer_configuration( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -147,6 +152,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_collection_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionInitializerConfigurationResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_initializer_configuration( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteInitializerConfigurationResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeleteInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_initializer_configuration( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::list_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListInitializerConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1alpha1::InitializerConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_initializer_configuration( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::patch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchInitializerConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_initializer_configuration( name: &str, optional: ReadInitializerConfigurationOptional<'_>, @@ -477,6 +494,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadInitializerConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadInitializerConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_initializer_configuration( name: &str, body: &crate::v1_10::api::admissionregistration::v1alpha1::InitializerConfiguration, @@ -569,6 +590,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceInitializerConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplaceInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceInitializerConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1alpha1::InitializerConfiguration), @@ -583,6 +606,7 @@ pub enum ReplaceInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_initializer_configuration( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::watch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchInitializerConfigurationResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/admissionregistration/v1alpha1/mod.rs b/src/v1_10/api/admissionregistration/v1alpha1/mod.rs index b1ef774c7b..2657f18e2f 100644 --- a/src/v1_10/api/admissionregistration/v1alpha1/mod.rs +++ b/src/v1_10/api/admissionregistration/v1alpha1/mod.rs @@ -1,28 +1,20 @@ mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializer_configuration; -pub use self::initializer_configuration::{ - InitializerConfiguration, - CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse, - DeleteCollectionInitializerConfigurationResponse, - DeleteInitializerConfigurationResponse, - ListInitializerConfigurationResponse, - PatchInitializerConfigurationResponse, - ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse, - ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse, - WatchInitializerConfigurationResponse, -}; +pub use self::initializer_configuration::InitializerConfiguration; +#[cfg(feature = "api")] pub use self::initializer_configuration::{CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteCollectionInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::ListInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::PatchInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::WatchInitializerConfigurationResponse; mod initializer_configuration_list; -pub use self::initializer_configuration_list::{ - InitializerConfigurationList, -}; +pub use self::initializer_configuration_list::InitializerConfigurationList; mod rule; -pub use self::rule::{ - Rule, -}; +pub use self::rule::Rule; diff --git a/src/v1_10/api/admissionregistration/v1beta1/mod.rs b/src/v1_10/api/admissionregistration/v1beta1/mod.rs index 9e4dd8f5a8..7dd5906135 100644 --- a/src/v1_10/api/admissionregistration/v1beta1/mod.rs +++ b/src/v1_10/api/admissionregistration/v1beta1/mod.rs @@ -1,56 +1,40 @@ mod mutating_webhook_configuration; -pub use self::mutating_webhook_configuration::{ - MutatingWebhookConfiguration, - CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse, - DeleteCollectionMutatingWebhookConfigurationResponse, - DeleteMutatingWebhookConfigurationResponse, - ListMutatingWebhookConfigurationResponse, - PatchMutatingWebhookConfigurationResponse, - ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse, - ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse, - WatchMutatingWebhookConfigurationResponse, -}; +pub use self::mutating_webhook_configuration::MutatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteCollectionMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::ListMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::PatchMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::WatchMutatingWebhookConfigurationResponse; mod mutating_webhook_configuration_list; -pub use self::mutating_webhook_configuration_list::{ - MutatingWebhookConfigurationList, -}; +pub use self::mutating_webhook_configuration_list::MutatingWebhookConfigurationList; mod rule_with_operations; -pub use self::rule_with_operations::{ - RuleWithOperations, -}; +pub use self::rule_with_operations::RuleWithOperations; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod validating_webhook_configuration; -pub use self::validating_webhook_configuration::{ - ValidatingWebhookConfiguration, - CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse, - DeleteCollectionValidatingWebhookConfigurationResponse, - DeleteValidatingWebhookConfigurationResponse, - ListValidatingWebhookConfigurationResponse, - PatchValidatingWebhookConfigurationResponse, - ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse, - ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse, - WatchValidatingWebhookConfigurationResponse, -}; +pub use self::validating_webhook_configuration::ValidatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteCollectionValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::ListValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::PatchValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::WatchValidatingWebhookConfigurationResponse; mod validating_webhook_configuration_list; -pub use self::validating_webhook_configuration_list::{ - ValidatingWebhookConfigurationList, -}; +pub use self::validating_webhook_configuration_list::ValidatingWebhookConfigurationList; mod webhook; -pub use self::webhook::{ - Webhook, -}; +pub use self::webhook::Webhook; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; diff --git a/src/v1_10/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs b/src/v1_10/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs index 8939395834..6068d68503 100644 --- a/src/v1_10/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs +++ b/src/v1_10/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_mutating_webhook_configuration( body: &crate::v1_10::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, optional: CreateMutatingWebhookConfigurationOptional<'_>, @@ -51,6 +52,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateMutatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreateMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateMutatingWebhookConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -66,6 +69,7 @@ pub enum CreateMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl MutatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_mutating_webhook_configuration( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -147,6 +152,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_collection_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionMutatingWebhookConfigurationResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_mutating_webhook_configuration( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteMutatingWebhookConfigurationResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeleteMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_mutating_webhook_configuration( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::list_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListMutatingWebhookConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1beta1::MutatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_mutating_webhook_configuration( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::patch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchMutatingWebhookConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_mutating_webhook_configuration( name: &str, optional: ReadMutatingWebhookConfigurationOptional<'_>, @@ -477,6 +494,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadMutatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadMutatingWebhookConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_mutating_webhook_configuration( name: &str, body: &crate::v1_10::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, @@ -569,6 +590,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceMutatingWebhookConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -583,6 +606,7 @@ pub enum ReplaceMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_mutating_webhook_configuration( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::watch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchMutatingWebhookConfigurationResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/admissionregistration/v1beta1/validating_webhook_configuration.rs b/src/v1_10/api/admissionregistration/v1beta1/validating_webhook_configuration.rs index 40d0f80bed..cc8968e39c 100644 --- a/src/v1_10/api/admissionregistration/v1beta1/validating_webhook_configuration.rs +++ b/src/v1_10/api/admissionregistration/v1beta1/validating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_validating_webhook_configuration( body: &crate::v1_10::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, optional: CreateValidatingWebhookConfigurationOptional<'_>, @@ -51,6 +52,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateValidatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreateValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateValidatingWebhookConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -66,6 +69,7 @@ pub enum CreateValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl ValidatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_validating_webhook_configuration( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -147,6 +152,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_collection_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionValidatingWebhookConfigurationResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_validating_webhook_configuration( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteValidatingWebhookConfigurationResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeleteValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_validating_webhook_configuration( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::list_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListValidatingWebhookConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1beta1::ValidatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_validating_webhook_configuration( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::patch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchValidatingWebhookConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_validating_webhook_configuration( name: &str, optional: ReadValidatingWebhookConfigurationOptional<'_>, @@ -477,6 +494,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadValidatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadValidatingWebhookConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_validating_webhook_configuration( name: &str, body: &crate::v1_10::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, @@ -569,6 +590,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceValidatingWebhookConfigurationResponse { Ok(crate::v1_10::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -583,6 +606,7 @@ pub enum ReplaceValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_validating_webhook_configuration( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::watch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchValidatingWebhookConfigurationResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1/controller_revision.rs b/src/v1_10/api/apps/v1/controller_revision.rs index d60f648e38..3c3f44d249 100644 --- a/src/v1_10/api/apps/v1/controller_revision.rs +++ b/src/v1_10/api/apps/v1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_10::api::apps::v1::ControllerRevision, @@ -61,6 +62,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1::ControllerRevision), @@ -76,6 +79,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,6 +716,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1::ControllerRevision), @@ -698,6 +724,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -767,12 +795,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -843,12 +874,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1/daemon_set.rs b/src/v1_10/api/apps/v1/daemon_set.rs index 2fd19b2109..40fc9d50f4 100644 --- a/src/v1_10/api/apps/v1/daemon_set.rs +++ b/src/v1_10/api/apps/v1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_10::api::apps::v1::DaemonSet, @@ -61,6 +62,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_10::api::apps::v1::DaemonSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_10::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_10::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_10::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_10::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_10::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_10::api::apps::v1::DaemonSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_10::api::apps::v1::DaemonSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1/deployment.rs b/src/v1_10/api/apps/v1/deployment.rs index 9a127b811e..996b4e0292 100644 --- a/src/v1_10/api/apps/v1/deployment.rs +++ b/src/v1_10/api/apps/v1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_10::api::apps::v1::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::apps::v1::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1/mod.rs b/src/v1_10/api/apps/v1/mod.rs index a25b916f02..971a3fb358 100644 --- a/src/v1_10/api/apps/v1/mod.rs +++ b/src/v1_10/api/apps/v1/mod.rs @@ -1,202 +1,146 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_10/api/apps/v1/replica_set.rs b/src/v1_10/api/apps/v1/replica_set.rs index ef6b4a02be..b0e06d74ba 100644 --- a/src/v1_10/api/apps/v1/replica_set.rs +++ b/src/v1_10/api/apps/v1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_10::api::apps::v1::ReplicaSet, @@ -61,6 +62,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_10::api::apps::v1::ReplicaSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_10::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_10::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_10::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_10::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_10::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_10::api::apps::v1::ReplicaSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_10::api::apps::v1::ReplicaSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1/stateful_set.rs b/src/v1_10/api/apps/v1/stateful_set.rs index 6f776d558d..6dfdc432d2 100644 --- a/src/v1_10/api/apps/v1/stateful_set.rs +++ b/src/v1_10/api/apps/v1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_10::api::apps::v1::StatefulSet, @@ -63,6 +64,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -70,6 +72,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1::StatefulSet), @@ -78,6 +81,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -143,6 +147,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -166,6 +171,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -173,6 +179,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -256,6 +264,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -263,6 +272,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -323,6 +333,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -344,12 +355,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -393,6 +406,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -411,12 +425,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -497,12 +514,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -554,6 +573,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -583,12 +603,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_10::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -638,6 +660,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -674,6 +697,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -685,12 +709,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -740,6 +766,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -768,6 +795,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -775,12 +803,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_10::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -832,6 +862,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -862,6 +893,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -869,6 +901,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1::StatefulSet), @@ -876,6 +909,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -935,6 +969,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -965,6 +1000,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -972,6 +1008,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_10::api::apps::v1::StatefulSet), @@ -979,6 +1016,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1034,6 +1072,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1055,12 +1094,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1106,6 +1147,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1124,12 +1166,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1beta1/controller_revision.rs b/src/v1_10/api/apps/v1beta1/controller_revision.rs index 62e0e32762..c2c22b8f59 100644 --- a/src/v1_10/api/apps/v1beta1/controller_revision.rs +++ b/src/v1_10/api/apps/v1beta1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_10::api::apps::v1beta1::ControllerRevision, @@ -61,6 +62,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1beta1::ControllerRevision), @@ -76,6 +79,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,6 +716,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1beta1::ControllerRevision), @@ -698,6 +724,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -767,12 +795,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -843,12 +874,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1beta1/deployment.rs b/src/v1_10/api/apps/v1beta1/deployment.rs index 516b53fbd1..63d67b8825 100644 --- a/src/v1_10/api/apps/v1beta1/deployment.rs +++ b/src/v1_10/api/apps/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_10::api::apps::v1beta1::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1beta1::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1beta1::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::apps::v1beta1::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1beta1/deployment_rollback.rs b/src/v1_10/api/apps/v1beta1/deployment_rollback.rs index 34b33cdb91..ce5e7699e4 100644 --- a/src/v1_10/api/apps/v1beta1/deployment_rollback.rs +++ b/src/v1_10/api/apps/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -67,6 +68,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// If 'true', then the output is pretty printed. @@ -74,6 +76,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -82,6 +85,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1beta1/mod.rs b/src/v1_10/api/apps/v1beta1/mod.rs index 93facd2f47..94ca19493a 100644 --- a/src/v1_10/api/apps/v1beta1/mod.rs +++ b/src/v1_10/api/apps/v1beta1/mod.rs @@ -1,148 +1,106 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_10/api/apps/v1beta1/scale.rs b/src/v1_10/api/apps/v1beta1/scale.rs index 1df1d82c04..43bc9a7b50 100644 --- a/src/v1_10/api/apps/v1beta1/scale.rs +++ b/src/v1_10/api/apps/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_10::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -207,6 +213,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -235,6 +242,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -242,12 +250,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -325,6 +336,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -332,12 +344,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_10::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +403,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -419,6 +434,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -426,6 +442,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::apps::v1beta1::Scale), @@ -433,6 +450,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -492,6 +510,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -522,6 +541,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -529,6 +549,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_10::api::apps::v1beta1::Scale), @@ -536,6 +557,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1beta1/stateful_set.rs b/src/v1_10/api/apps/v1beta1/stateful_set.rs index 580447a8a2..a53a137038 100644 --- a/src/v1_10/api/apps/v1beta1/stateful_set.rs +++ b/src/v1_10/api/apps/v1beta1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_10::api::apps::v1beta1::StatefulSet, @@ -63,6 +64,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -70,6 +72,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1beta1::StatefulSet), @@ -78,6 +81,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -143,6 +147,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -166,6 +171,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -173,6 +179,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -256,6 +264,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -263,6 +272,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -323,6 +333,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -344,12 +355,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -393,6 +406,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -411,12 +425,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -497,12 +514,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -554,6 +573,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -583,12 +603,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -638,6 +660,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -674,6 +697,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -685,12 +709,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -740,6 +766,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -768,6 +795,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -775,12 +803,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -832,6 +862,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -862,6 +893,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -869,6 +901,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1beta1::StatefulSet), @@ -876,6 +909,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -935,6 +969,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -965,6 +1000,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -972,6 +1008,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta1::StatefulSet), @@ -979,6 +1016,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1034,6 +1072,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1055,12 +1094,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1106,6 +1147,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1124,12 +1166,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1beta2/controller_revision.rs b/src/v1_10/api/apps/v1beta2/controller_revision.rs index 8f94bdc00b..be4902b412 100644 --- a/src/v1_10/api/apps/v1beta2/controller_revision.rs +++ b/src/v1_10/api/apps/v1beta2/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_10::api::apps::v1beta2::ControllerRevision, @@ -61,6 +62,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1beta2::ControllerRevision), @@ -76,6 +79,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,6 +716,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_10::api::apps::v1beta2::ControllerRevision), @@ -698,6 +724,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -767,12 +795,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -843,12 +874,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1beta2/daemon_set.rs b/src/v1_10/api/apps/v1beta2/daemon_set.rs index 653714fe77..ba293b3516 100644 --- a/src/v1_10/api/apps/v1beta2/daemon_set.rs +++ b/src/v1_10/api/apps/v1beta2/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_10::api::apps::v1beta2::DaemonSet, @@ -61,6 +62,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_10::api::apps::v1beta2::DaemonSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_10::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_10::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_10::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_10::api::apps::v1beta2::DaemonSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::DaemonSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1beta2/deployment.rs b/src/v1_10/api/apps/v1beta2/deployment.rs index d35e03cb98..6b8807da03 100644 --- a/src/v1_10/api/apps/v1beta2/deployment.rs +++ b/src/v1_10/api/apps/v1beta2/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_10::api::apps::v1beta2::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1beta2::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_10::api::apps::v1beta2::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1beta2/mod.rs b/src/v1_10/api/apps/v1beta2/mod.rs index a95884f4d6..60c611aefd 100644 --- a/src/v1_10/api/apps/v1beta2/mod.rs +++ b/src/v1_10/api/apps/v1beta2/mod.rs @@ -1,226 +1,164 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_10/api/apps/v1beta2/replica_set.rs b/src/v1_10/api/apps/v1beta2/replica_set.rs index 66722f8850..aaa005bb94 100644 --- a/src/v1_10/api/apps/v1beta2/replica_set.rs +++ b/src/v1_10/api/apps/v1beta2/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_10::api::apps::v1beta2::ReplicaSet, @@ -61,6 +62,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_10::api::apps::v1beta2::ReplicaSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_10::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_10::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_10::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_10::api::apps::v1beta2::ReplicaSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::ReplicaSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1beta2/scale.rs b/src/v1_10/api/apps/v1beta2/scale.rs index 62a07341ca..14bf6368fe 100644 --- a/src/v1_10/api/apps/v1beta2/scale.rs +++ b/src/v1_10/api/apps/v1beta2/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_10::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_10::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_10::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_10::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -595,6 +617,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -602,6 +625,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::apps::v1beta2::Scale), @@ -609,6 +633,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +693,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -698,6 +724,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -705,6 +732,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_10::api::apps::v1beta2::Scale), @@ -712,6 +740,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +800,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -801,6 +831,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -808,6 +839,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_10::api::apps::v1beta2::Scale), @@ -815,6 +847,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/apps/v1beta2/stateful_set.rs b/src/v1_10/api/apps/v1beta2/stateful_set.rs index a7ba72f3f5..bd51a04ae8 100644 --- a/src/v1_10/api/apps/v1beta2/stateful_set.rs +++ b/src/v1_10/api/apps/v1beta2/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_10::api::apps::v1beta2::StatefulSet, @@ -63,6 +64,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -70,6 +72,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1beta2::StatefulSet), @@ -78,6 +81,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -143,6 +147,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -166,6 +171,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -173,6 +179,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -256,6 +264,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -263,6 +272,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -323,6 +333,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -344,12 +355,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -393,6 +406,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -411,12 +425,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_10::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -497,12 +514,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -554,6 +573,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -583,12 +603,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -638,6 +660,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -674,6 +697,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -685,12 +709,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -740,6 +766,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -768,6 +795,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -775,12 +803,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -832,6 +862,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -862,6 +893,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -869,6 +901,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_10::api::apps::v1beta2::StatefulSet), @@ -876,6 +909,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -935,6 +969,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -965,6 +1000,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -972,6 +1008,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_10::api::apps::v1beta2::StatefulSet), @@ -979,6 +1016,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1034,6 +1072,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1055,12 +1094,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1106,6 +1147,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1124,12 +1166,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/authentication/v1/mod.rs b/src/v1_10/api/authentication/v1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_10/api/authentication/v1/mod.rs +++ b/src/v1_10/api/authentication/v1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_10/api/authentication/v1/token_review.rs b/src/v1_10/api/authentication/v1/token_review.rs index 004f8d225d..001175bfe8 100644 --- a/src/v1_10/api/authentication/v1/token_review.rs +++ b/src/v1_10/api/authentication/v1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_10::api::authentication::v1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -53,6 +54,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_10::api::authentication::v1::TokenReview), @@ -68,6 +71,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/authentication/v1beta1/mod.rs b/src/v1_10/api/authentication/v1beta1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_10/api/authentication/v1beta1/mod.rs +++ b/src/v1_10/api/authentication/v1beta1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_10/api/authentication/v1beta1/token_review.rs b/src/v1_10/api/authentication/v1beta1/token_review.rs index d94e3841f7..d32805f3d7 100644 --- a/src/v1_10/api/authentication/v1beta1/token_review.rs +++ b/src/v1_10/api/authentication/v1beta1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_10::api::authentication::v1beta1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -53,6 +54,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_10::api::authentication::v1beta1::TokenReview), @@ -68,6 +71,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/authorization/v1/local_subject_access_review.rs b/src/v1_10/api/authorization/v1/local_subject_access_review.rs index 09296f58f5..ac66e2335e 100644 --- a/src/v1_10/api/authorization/v1/local_subject_access_review.rs +++ b/src/v1_10/api/authorization/v1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_10::api::authorization::v1::LocalSubjectAccessReview, @@ -60,6 +61,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,6 +69,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_10::api::authorization::v1::LocalSubjectAccessReview), @@ -75,6 +78,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/authorization/v1/mod.rs b/src/v1_10/api/authorization/v1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_10/api/authorization/v1/mod.rs +++ b/src/v1_10/api/authorization/v1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_10/api/authorization/v1/self_subject_access_review.rs b/src/v1_10/api/authorization/v1/self_subject_access_review.rs index 0d1c9b1391..4eb05b66cf 100644 --- a/src/v1_10/api/authorization/v1/self_subject_access_review.rs +++ b/src/v1_10/api/authorization/v1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_10::api::authorization::v1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_10::api::authorization::v1::SelfSubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/authorization/v1/self_subject_rules_review.rs b/src/v1_10/api/authorization/v1/self_subject_rules_review.rs index 050b09cd1e..119fe3d540 100644 --- a/src/v1_10/api/authorization/v1/self_subject_rules_review.rs +++ b/src/v1_10/api/authorization/v1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_10::api::authorization::v1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_10::api::authorization::v1::SelfSubjectRulesReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/authorization/v1/subject_access_review.rs b/src/v1_10/api/authorization/v1/subject_access_review.rs index 10fca5438d..e6b1cc5117 100644 --- a/src/v1_10/api/authorization/v1/subject_access_review.rs +++ b/src/v1_10/api/authorization/v1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_10::api::authorization::v1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_10::api::authorization::v1::SubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/authorization/v1beta1/local_subject_access_review.rs b/src/v1_10/api/authorization/v1beta1/local_subject_access_review.rs index 5adfd68336..f6a19332a5 100644 --- a/src/v1_10/api/authorization/v1beta1/local_subject_access_review.rs +++ b/src/v1_10/api/authorization/v1beta1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_10::api::authorization::v1beta1::LocalSubjectAccessReview, @@ -60,6 +61,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,6 +69,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_10::api::authorization::v1beta1::LocalSubjectAccessReview), @@ -75,6 +78,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/authorization/v1beta1/mod.rs b/src/v1_10/api/authorization/v1beta1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_10/api/authorization/v1beta1/mod.rs +++ b/src/v1_10/api/authorization/v1beta1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_10/api/authorization/v1beta1/self_subject_access_review.rs b/src/v1_10/api/authorization/v1beta1/self_subject_access_review.rs index 3e63c25219..03d9c629df 100644 --- a/src/v1_10/api/authorization/v1beta1/self_subject_access_review.rs +++ b/src/v1_10/api/authorization/v1beta1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_10::api::authorization::v1beta1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_10::api::authorization::v1beta1::SelfSubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/authorization/v1beta1/self_subject_rules_review.rs b/src/v1_10/api/authorization/v1beta1/self_subject_rules_review.rs index fd72797519..f0cefa8578 100644 --- a/src/v1_10/api/authorization/v1beta1/self_subject_rules_review.rs +++ b/src/v1_10/api/authorization/v1beta1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_10::api::authorization::v1beta1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_10::api::authorization::v1beta1::SelfSubjectRulesReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/authorization/v1beta1/subject_access_review.rs b/src/v1_10/api/authorization/v1beta1/subject_access_review.rs index a94fa78fd4..84a93a3a45 100644 --- a/src/v1_10/api/authorization/v1beta1/subject_access_review.rs +++ b/src/v1_10/api/authorization/v1beta1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_10::api::authorization::v1beta1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_10::api::authorization::v1beta1::SubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/autoscaling/v1/horizontal_pod_autoscaler.rs b/src/v1_10/api/autoscaling/v1/horizontal_pod_autoscaler.rs index 3dec805534..f4beefd730 100644 --- a/src/v1_10/api/autoscaling/v1/horizontal_pod_autoscaler.rs +++ b/src/v1_10/api/autoscaling/v1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_10::api::autoscaling::v1::HorizontalPodAutoscaler, @@ -61,6 +62,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -76,6 +79,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_10::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_10::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_10::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_10::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/autoscaling/v1/mod.rs b/src/v1_10/api/autoscaling/v1/mod.rs index a4f7a0312d..09ed1f1487 100644 --- a/src/v1_10/api/autoscaling/v1/mod.rs +++ b/src/v1_10/api/autoscaling/v1/mod.rs @@ -1,65 +1,49 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - PatchNamespacedReplicationControllerScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, - ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; diff --git a/src/v1_10/api/autoscaling/v1/scale.rs b/src/v1_10/api/autoscaling/v1/scale.rs index b0672fd3ed..a053ccf85b 100644 --- a/src/v1_10/api/autoscaling/v1/scale.rs +++ b/src/v1_10/api/autoscaling/v1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -295,6 +304,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -324,12 +334,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -379,6 +391,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -407,6 +420,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -414,12 +428,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -497,6 +514,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -504,12 +522,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -559,6 +579,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -587,6 +608,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -594,12 +616,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -649,6 +673,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -677,6 +702,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -684,12 +710,14 @@ pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +769,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -771,6 +800,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -778,6 +808,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), @@ -785,6 +816,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -844,6 +876,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -874,6 +907,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -881,6 +915,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), @@ -888,6 +923,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -947,6 +983,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -977,6 +1014,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -984,6 +1022,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), @@ -991,6 +1030,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1050,6 +1090,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -1080,6 +1121,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1087,6 +1129,7 @@ pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerScaleResponse { Ok(crate::v1_10::api::autoscaling::v1::Scale), @@ -1094,6 +1137,7 @@ pub enum ReplaceNamespacedReplicationControllerScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs b/src/v1_10/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs index 5ce7ff42ba..b924da6d0d 100644 --- a/src/v1_10/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs +++ b/src/v1_10/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_10::api::autoscaling::v2beta1::HorizontalPodAutoscaler, @@ -61,6 +62,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -76,6 +79,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_10::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_10::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_10::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_10::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/autoscaling/v2beta1/mod.rs b/src/v1_10/api/autoscaling/v2beta1/mod.rs index edb3c1e242..83788a8cb3 100644 --- a/src/v1_10/api/autoscaling/v2beta1/mod.rs +++ b/src/v1_10/api/autoscaling/v2beta1/mod.rs @@ -1,93 +1,61 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod external_metric_source; -pub use self::external_metric_source::{ - ExternalMetricSource, -}; +pub use self::external_metric_source::ExternalMetricSource; mod external_metric_status; -pub use self::external_metric_status::{ - ExternalMetricStatus, -}; +pub use self::external_metric_status::ExternalMetricStatus; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_10/api/batch/v1/job.rs b/src/v1_10/api/batch/v1/job.rs index 4924007ee4..020789a4ff 100644 --- a/src/v1_10/api/batch/v1/job.rs +++ b/src/v1_10/api/batch/v1/job.rs @@ -33,6 +33,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_job( namespace: &str, body: &crate::v1_10::api::batch::v1::Job, @@ -61,6 +62,7 @@ impl Job { } /// Optional parameters of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedJobResponse { Ok(crate::v1_10::api::batch::v1::Job), @@ -76,6 +79,7 @@ pub enum CreateNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Job { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_job( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_collection_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedJobResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_job( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedJobResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_job_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListJobForAllNamespacesResponse { Ok(crate::v1_10::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_job( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedJobResponse { Ok(crate::v1_10::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobResponse { Ok(crate::v1_10::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobStatusResponse { Ok(crate::v1_10::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobResponse { Ok(crate::v1_10::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobStatusResponse { Ok(crate::v1_10::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobResponse { Ok(crate::v1_10::api::batch::v1::Job), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobStatusResponse { Ok(crate::v1_10::api::batch::v1::Job), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_job_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchJobForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_job( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedJobResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/batch/v1/mod.rs b/src/v1_10/api/batch/v1/mod.rs index 68e7a18867..97d7bccb74 100644 --- a/src/v1_10/api/batch/v1/mod.rs +++ b/src/v1_10/api/batch/v1/mod.rs @@ -1,38 +1,28 @@ mod job; -pub use self::job::{ - Job, - CreateNamespacedJobOptional, CreateNamespacedJobResponse, - DeleteCollectionNamespacedJobResponse, - DeleteNamespacedJobResponse, - ListJobForAllNamespacesResponse, - ListNamespacedJobResponse, - PatchNamespacedJobResponse, - PatchNamespacedJobStatusResponse, - ReadNamespacedJobOptional, ReadNamespacedJobResponse, - ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse, - ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse, - ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse, - WatchJobForAllNamespacesResponse, - WatchNamespacedJobResponse, -}; +pub use self::job::Job; +#[cfg(feature = "api")] pub use self::job::{CreateNamespacedJobOptional, CreateNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::DeleteCollectionNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::DeleteNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::ListJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::ListNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobStatusResponse; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobOptional, ReadNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::WatchJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::WatchNamespacedJobResponse; mod job_condition; -pub use self::job_condition::{ - JobCondition, -}; +pub use self::job_condition::JobCondition; mod job_list; -pub use self::job_list::{ - JobList, -}; +pub use self::job_list::JobList; mod job_spec; -pub use self::job_spec::{ - JobSpec, -}; +pub use self::job_spec::JobSpec; mod job_status; -pub use self::job_status::{ - JobStatus, -}; +pub use self::job_status::JobStatus; diff --git a/src/v1_10/api/batch/v1beta1/cron_job.rs b/src/v1_10/api/batch/v1beta1/cron_job.rs index 15691c7c8d..635a856f92 100644 --- a/src/v1_10/api/batch/v1beta1/cron_job.rs +++ b/src/v1_10/api/batch/v1beta1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_10::api::batch::v1beta1::CronJob, @@ -61,6 +62,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_10::api::batch::v1beta1::CronJob), @@ -76,6 +79,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_10::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_10::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_10::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_10::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_10::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_10::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_10::api::batch::v1beta1::CronJob), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_10::api::batch::v1beta1::CronJob), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/batch/v1beta1/mod.rs b/src/v1_10/api/batch/v1beta1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_10/api/batch/v1beta1/mod.rs +++ b/src/v1_10/api/batch/v1beta1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_10/api/batch/v2alpha1/cron_job.rs b/src/v1_10/api/batch/v2alpha1/cron_job.rs index f0977b437a..e254e13687 100644 --- a/src/v1_10/api/batch/v2alpha1/cron_job.rs +++ b/src/v1_10/api/batch/v2alpha1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_10::api::batch::v2alpha1::CronJob, @@ -61,6 +62,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_10::api::batch::v2alpha1::CronJob), @@ -76,6 +79,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_10::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_10::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_10::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_10::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_10::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_10::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_10::api::batch::v2alpha1::CronJob), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_10::api::batch::v2alpha1::CronJob), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/batch/v2alpha1/mod.rs b/src/v1_10/api/batch/v2alpha1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_10/api/batch/v2alpha1/mod.rs +++ b/src/v1_10/api/batch/v2alpha1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_10/api/certificates/v1beta1/certificate_signing_request.rs b/src/v1_10/api/certificates/v1beta1/certificate_signing_request.rs index 97dd80f23b..c9eb908fb9 100644 --- a/src/v1_10/api/certificates/v1beta1/certificate_signing_request.rs +++ b/src/v1_10/api/certificates/v1beta1/certificate_signing_request.rs @@ -28,6 +28,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_certificate_signing_request( body: &crate::v1_10::api::certificates::v1beta1::CertificateSigningRequest, optional: CreateCertificateSigningRequestOptional<'_>, @@ -53,6 +54,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCertificateSigningRequestOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCertificateSigningRequestResponse { Ok(crate::v1_10::api::certificates::v1beta1::CertificateSigningRequest), @@ -68,6 +71,7 @@ pub enum CreateCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -129,6 +133,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_certificate_signing_request( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -148,6 +153,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCertificateSigningRequestResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -155,6 +161,7 @@ pub enum DeleteCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -213,6 +220,7 @@ impl CertificateSigningRequest { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_certificate_signing_request( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -233,6 +241,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_collection_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCertificateSigningRequestResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteCollectionCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_certificate_signing_request( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::list_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCertificateSigningRequestResponse { Ok(crate::v1_10::api::certificates::v1beta1::CertificateSigningRequestList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -394,12 +408,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestResponse { Ok(crate::v1_10::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request( name: &str, optional: ReadCertificateSigningRequestOptional<'_>, @@ -479,6 +496,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -490,12 +508,14 @@ pub struct ReadCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestResponse { Ok(crate::v1_10::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -543,6 +563,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request( name: &str, body: &crate::v1_10::api::certificates::v1beta1::CertificateSigningRequest, @@ -571,6 +592,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestOptional<'a> { /// If 'true', then the output is pretty printed. @@ -578,6 +600,7 @@ pub struct ReplaceCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestResponse { Ok(crate::v1_10::api::certificates::v1beta1::CertificateSigningRequest), @@ -585,6 +608,7 @@ pub enum ReplaceCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -640,6 +664,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_approval( name: &str, body: &crate::v1_10::api::certificates::v1beta1::CertificateSigningRequest, @@ -668,6 +693,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,6 +701,7 @@ pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestApprovalResponse { Ok(crate::v1_10::api::certificates::v1beta1::CertificateSigningRequest), @@ -682,6 +709,7 @@ pub enum ReplaceCertificateSigningRequestApprovalResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestApprovalResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -737,6 +765,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_status( name: &str, body: &crate::v1_10::api::certificates::v1beta1::CertificateSigningRequest, @@ -765,6 +794,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -772,6 +802,7 @@ pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestStatusResponse { Ok(crate::v1_10::api::certificates::v1beta1::CertificateSigningRequest), @@ -779,6 +810,7 @@ pub enum ReplaceCertificateSigningRequestStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +862,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_certificate_signing_request( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -848,12 +881,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::watch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCertificateSigningRequestResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/certificates/v1beta1/mod.rs b/src/v1_10/api/certificates/v1beta1/mod.rs index 7550699fa0..1e75e0820e 100644 --- a/src/v1_10/api/certificates/v1beta1/mod.rs +++ b/src/v1_10/api/certificates/v1beta1/mod.rs @@ -1,35 +1,25 @@ mod certificate_signing_request; -pub use self::certificate_signing_request::{ - CertificateSigningRequest, - CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse, - DeleteCertificateSigningRequestResponse, - DeleteCollectionCertificateSigningRequestResponse, - ListCertificateSigningRequestResponse, - PatchCertificateSigningRequestResponse, - ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse, - ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse, - ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse, - ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse, - WatchCertificateSigningRequestResponse, -}; +pub use self::certificate_signing_request::CertificateSigningRequest; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCollectionCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::ListCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::WatchCertificateSigningRequestResponse; mod certificate_signing_request_condition; -pub use self::certificate_signing_request_condition::{ - CertificateSigningRequestCondition, -}; +pub use self::certificate_signing_request_condition::CertificateSigningRequestCondition; mod certificate_signing_request_list; -pub use self::certificate_signing_request_list::{ - CertificateSigningRequestList, -}; +pub use self::certificate_signing_request_list::CertificateSigningRequestList; mod certificate_signing_request_spec; -pub use self::certificate_signing_request_spec::{ - CertificateSigningRequestSpec, -}; +pub use self::certificate_signing_request_spec::CertificateSigningRequestSpec; mod certificate_signing_request_status; -pub use self::certificate_signing_request_status::{ - CertificateSigningRequestStatus, -}; +pub use self::certificate_signing_request_status::CertificateSigningRequestStatus; diff --git a/src/v1_10/api/core/v1/binding.rs b/src/v1_10/api/core/v1/binding.rs index 5de2d66488..6c654b7195 100644 --- a/src/v1_10/api/core/v1/binding.rs +++ b/src/v1_10/api/core/v1/binding.rs @@ -30,6 +30,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_binding( namespace: &str, body: &crate::v1_10::api::core::v1::Binding, @@ -58,6 +59,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedBindingResponse { Ok(crate::v1_10::api::core::v1::Binding), @@ -73,6 +76,7 @@ pub enum CreateNamespacedBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -140,6 +144,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_binding( name: &str, namespace: &str, @@ -170,6 +175,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -177,6 +183,7 @@ pub struct CreateNamespacedPodBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodBindingResponse { Ok(crate::v1_10::api::core::v1::Binding), @@ -185,6 +192,7 @@ pub enum CreateNamespacedPodBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/component_status.rs b/src/v1_10/api/core/v1/component_status.rs index 919dc81afd..b9be69c619 100644 --- a/src/v1_10/api/core/v1/component_status.rs +++ b/src/v1_10/api/core/v1/component_status.rs @@ -26,6 +26,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_component_status( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -44,12 +45,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::list_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListComponentStatusResponse { Ok(crate::v1_10::api::core::v1::ComponentStatusList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -95,6 +98,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_component_status( name: &str, optional: ReadComponentStatusOptional<'_>, @@ -121,6 +125,7 @@ impl ComponentStatus { } /// Optional parameters of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadComponentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -128,12 +133,14 @@ pub struct ReadComponentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadComponentStatusResponse { Ok(crate::v1_10::api::core::v1::ComponentStatus), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -177,6 +184,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_component_status( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -195,12 +203,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::watch_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchComponentStatusResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/config_map.rs b/src/v1_10/api/core/v1/config_map.rs index 21915e8a78..21334e0252 100644 --- a/src/v1_10/api/core/v1/config_map.rs +++ b/src/v1_10/api/core/v1/config_map.rs @@ -33,6 +33,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_config_map( namespace: &str, body: &crate::v1_10::api::core::v1::ConfigMap, @@ -61,6 +62,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedConfigMapOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedConfigMapResponse { Ok(crate::v1_10::api::core::v1::ConfigMap), @@ -76,6 +79,7 @@ pub enum CreateNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ConfigMap { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_config_map( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_collection_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedConfigMapResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_config_map( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedConfigMapResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_config_map_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListConfigMapForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_config_map( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedConfigMapResponse { Ok(crate::v1_10::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_config_map( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::patch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedConfigMapResponse { Ok(crate::v1_10::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_config_map( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedConfigMapOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedConfigMapResponse { Ok(crate::v1_10::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_config_map( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedConfigMapOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,6 +716,7 @@ pub struct ReplaceNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedConfigMapResponse { Ok(crate::v1_10::api::core::v1::ConfigMap), @@ -698,6 +724,7 @@ pub enum ReplaceNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_config_map_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -767,12 +795,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchConfigMapForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_config_map( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -843,12 +874,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedConfigMapResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/endpoints.rs b/src/v1_10/api/core/v1/endpoints.rs index ed380bb9c3..fdf78bf05f 100644 --- a/src/v1_10/api/core/v1/endpoints.rs +++ b/src/v1_10/api/core/v1/endpoints.rs @@ -41,6 +41,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_endpoints( namespace: &str, body: &crate::v1_10::api::core::v1::Endpoints, @@ -69,6 +70,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEndpointsOptional<'a> { /// If 'true', then the output is pretty printed. @@ -76,6 +78,7 @@ pub struct CreateNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEndpointsResponse { Ok(crate::v1_10::api::core::v1::Endpoints), @@ -84,6 +87,7 @@ pub enum CreateNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -149,6 +153,7 @@ impl Endpoints { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_endpoints( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -172,6 +177,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_collection_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEndpointsResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -179,6 +185,7 @@ pub enum DeleteCollectionNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -241,6 +248,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_endpoints( name: &str, namespace: &str, @@ -262,6 +270,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEndpointsResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -269,6 +278,7 @@ pub enum DeleteNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -325,6 +335,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_endpoints_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -343,12 +354,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEndpointsForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -396,6 +409,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_endpoints( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -417,12 +431,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEndpointsResponse { Ok(crate::v1_10::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -474,6 +490,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_endpoints( name: &str, namespace: &str, @@ -503,12 +520,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::patch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEndpointsResponse { Ok(crate::v1_10::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -558,6 +577,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_endpoints( name: &str, namespace: &str, @@ -594,6 +614,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEndpointsOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -605,12 +626,14 @@ pub struct ReadNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEndpointsResponse { Ok(crate::v1_10::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -662,6 +685,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_endpoints( name: &str, namespace: &str, @@ -692,6 +716,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEndpointsOptional<'a> { /// If 'true', then the output is pretty printed. @@ -699,6 +724,7 @@ pub struct ReplaceNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEndpointsResponse { Ok(crate::v1_10::api::core::v1::Endpoints), @@ -706,6 +732,7 @@ pub enum ReplaceNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -757,6 +784,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_endpoints_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -775,12 +803,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEndpointsForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_endpoints( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -851,12 +882,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEndpointsResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/event.rs b/src/v1_10/api/core/v1/event.rs index 3d09f1cec0..bfa31e6c42 100644 --- a/src/v1_10/api/core/v1/event.rs +++ b/src/v1_10/api/core/v1/event.rs @@ -69,6 +69,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_10::api::core::v1::Event, @@ -97,6 +98,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -104,6 +106,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_10::api::core::v1::Event), @@ -112,6 +115,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -177,6 +181,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -200,6 +205,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -207,6 +213,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -269,6 +276,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -290,6 +298,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -297,6 +306,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -353,6 +363,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -371,12 +382,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -424,6 +437,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -445,12 +459,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_10::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -502,6 +518,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -531,12 +548,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_10::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -586,6 +605,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -622,6 +642,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -633,12 +654,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_10::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -690,6 +713,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -720,6 +744,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -727,6 +752,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_10::api::core::v1::Event), @@ -734,6 +760,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -785,6 +812,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -803,12 +831,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -858,6 +888,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -879,12 +910,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/limit_range.rs b/src/v1_10/api/core/v1/limit_range.rs index cd5aa33d3e..d5753d647e 100644 --- a/src/v1_10/api/core/v1/limit_range.rs +++ b/src/v1_10/api/core/v1/limit_range.rs @@ -30,6 +30,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_limit_range( namespace: &str, body: &crate::v1_10::api::core::v1::LimitRange, @@ -58,6 +59,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLimitRangeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLimitRangeResponse { Ok(crate::v1_10::api::core::v1::LimitRange), @@ -73,6 +76,7 @@ pub enum CreateNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl LimitRange { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_limit_range( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_collection_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLimitRangeResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_limit_range( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLimitRangeResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -314,6 +324,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_limit_range_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -332,12 +343,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLimitRangeForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -385,6 +398,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_limit_range( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -406,12 +420,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLimitRangeResponse { Ok(crate::v1_10::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_limit_range( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::patch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLimitRangeResponse { Ok(crate::v1_10::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_limit_range( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLimitRangeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLimitRangeResponse { Ok(crate::v1_10::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_limit_range( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLimitRangeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLimitRangeResponse { Ok(crate::v1_10::api::core::v1::LimitRange), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -746,6 +773,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_limit_range_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -764,12 +792,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLimitRangeForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -819,6 +849,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_limit_range( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -840,12 +871,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLimitRangeResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/mod.rs b/src/v1_10/api/core/v1/mod.rs index 4199435f1f..4203274344 100644 --- a/src/v1_10/api/core/v1/mod.rs +++ b/src/v1_10/api/core/v1/mod.rs @@ -1,1039 +1,707 @@ mod aws_elastic_block_store_volume_source; -pub use self::aws_elastic_block_store_volume_source::{ - AWSElasticBlockStoreVolumeSource, -}; +pub use self::aws_elastic_block_store_volume_source::AWSElasticBlockStoreVolumeSource; mod affinity; -pub use self::affinity::{ - Affinity, -}; +pub use self::affinity::Affinity; mod attached_volume; -pub use self::attached_volume::{ - AttachedVolume, -}; +pub use self::attached_volume::AttachedVolume; mod azure_disk_volume_source; -pub use self::azure_disk_volume_source::{ - AzureDiskVolumeSource, -}; +pub use self::azure_disk_volume_source::AzureDiskVolumeSource; mod azure_file_persistent_volume_source; -pub use self::azure_file_persistent_volume_source::{ - AzureFilePersistentVolumeSource, -}; +pub use self::azure_file_persistent_volume_source::AzureFilePersistentVolumeSource; mod azure_file_volume_source; -pub use self::azure_file_volume_source::{ - AzureFileVolumeSource, -}; +pub use self::azure_file_volume_source::AzureFileVolumeSource; mod binding; -pub use self::binding::{ - Binding, - CreateNamespacedBindingOptional, CreateNamespacedBindingResponse, - CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse, -}; +pub use self::binding::Binding; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedBindingOptional, CreateNamespacedBindingResponse}; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse}; mod csi_persistent_volume_source; -pub use self::csi_persistent_volume_source::{ - CSIPersistentVolumeSource, -}; +pub use self::csi_persistent_volume_source::CSIPersistentVolumeSource; mod capabilities; -pub use self::capabilities::{ - Capabilities, -}; +pub use self::capabilities::Capabilities; mod ceph_fs_persistent_volume_source; -pub use self::ceph_fs_persistent_volume_source::{ - CephFSPersistentVolumeSource, -}; +pub use self::ceph_fs_persistent_volume_source::CephFSPersistentVolumeSource; mod ceph_fs_volume_source; -pub use self::ceph_fs_volume_source::{ - CephFSVolumeSource, -}; +pub use self::ceph_fs_volume_source::CephFSVolumeSource; mod cinder_volume_source; -pub use self::cinder_volume_source::{ - CinderVolumeSource, -}; +pub use self::cinder_volume_source::CinderVolumeSource; mod client_ip_config; -pub use self::client_ip_config::{ - ClientIPConfig, -}; +pub use self::client_ip_config::ClientIPConfig; mod component_condition; -pub use self::component_condition::{ - ComponentCondition, -}; +pub use self::component_condition::ComponentCondition; mod component_status; -pub use self::component_status::{ - ComponentStatus, - ListComponentStatusResponse, - ReadComponentStatusOptional, ReadComponentStatusResponse, - WatchComponentStatusResponse, -}; +pub use self::component_status::ComponentStatus; +#[cfg(feature = "api")] pub use self::component_status::ListComponentStatusResponse; +#[cfg(feature = "api")] pub use self::component_status::{ReadComponentStatusOptional, ReadComponentStatusResponse}; +#[cfg(feature = "api")] pub use self::component_status::WatchComponentStatusResponse; mod component_status_list; -pub use self::component_status_list::{ - ComponentStatusList, -}; +pub use self::component_status_list::ComponentStatusList; mod config_map; -pub use self::config_map::{ - ConfigMap, - CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse, - DeleteCollectionNamespacedConfigMapResponse, - DeleteNamespacedConfigMapResponse, - ListConfigMapForAllNamespacesResponse, - ListNamespacedConfigMapResponse, - PatchNamespacedConfigMapResponse, - ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse, - ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse, - WatchConfigMapForAllNamespacesResponse, - WatchNamespacedConfigMapResponse, -}; +pub use self::config_map::ConfigMap; +#[cfg(feature = "api")] pub use self::config_map::{CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::DeleteCollectionNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::DeleteNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::ListConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::ListNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::PatchNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::{ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::{ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::WatchConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::WatchNamespacedConfigMapResponse; mod config_map_env_source; -pub use self::config_map_env_source::{ - ConfigMapEnvSource, -}; +pub use self::config_map_env_source::ConfigMapEnvSource; mod config_map_key_selector; -pub use self::config_map_key_selector::{ - ConfigMapKeySelector, -}; +pub use self::config_map_key_selector::ConfigMapKeySelector; mod config_map_list; -pub use self::config_map_list::{ - ConfigMapList, -}; +pub use self::config_map_list::ConfigMapList; mod config_map_projection; -pub use self::config_map_projection::{ - ConfigMapProjection, -}; +pub use self::config_map_projection::ConfigMapProjection; mod config_map_volume_source; -pub use self::config_map_volume_source::{ - ConfigMapVolumeSource, -}; +pub use self::config_map_volume_source::ConfigMapVolumeSource; mod container; -pub use self::container::{ - Container, -}; +pub use self::container::Container; mod container_image; -pub use self::container_image::{ - ContainerImage, -}; +pub use self::container_image::ContainerImage; mod container_port; -pub use self::container_port::{ - ContainerPort, -}; +pub use self::container_port::ContainerPort; mod container_state; -pub use self::container_state::{ - ContainerState, -}; +pub use self::container_state::ContainerState; mod container_state_running; -pub use self::container_state_running::{ - ContainerStateRunning, -}; +pub use self::container_state_running::ContainerStateRunning; mod container_state_terminated; -pub use self::container_state_terminated::{ - ContainerStateTerminated, -}; +pub use self::container_state_terminated::ContainerStateTerminated; mod container_state_waiting; -pub use self::container_state_waiting::{ - ContainerStateWaiting, -}; +pub use self::container_state_waiting::ContainerStateWaiting; mod container_status; -pub use self::container_status::{ - ContainerStatus, -}; +pub use self::container_status::ContainerStatus; mod daemon_endpoint; -pub use self::daemon_endpoint::{ - DaemonEndpoint, -}; +pub use self::daemon_endpoint::DaemonEndpoint; mod downward_api_projection; -pub use self::downward_api_projection::{ - DownwardAPIProjection, -}; +pub use self::downward_api_projection::DownwardAPIProjection; mod downward_api_volume_file; -pub use self::downward_api_volume_file::{ - DownwardAPIVolumeFile, -}; +pub use self::downward_api_volume_file::DownwardAPIVolumeFile; mod downward_api_volume_source; -pub use self::downward_api_volume_source::{ - DownwardAPIVolumeSource, -}; +pub use self::downward_api_volume_source::DownwardAPIVolumeSource; mod empty_dir_volume_source; -pub use self::empty_dir_volume_source::{ - EmptyDirVolumeSource, -}; +pub use self::empty_dir_volume_source::EmptyDirVolumeSource; mod endpoint_address; -pub use self::endpoint_address::{ - EndpointAddress, -}; +pub use self::endpoint_address::EndpointAddress; mod endpoint_port; -pub use self::endpoint_port::{ - EndpointPort, -}; +pub use self::endpoint_port::EndpointPort; mod endpoint_subset; -pub use self::endpoint_subset::{ - EndpointSubset, -}; +pub use self::endpoint_subset::EndpointSubset; mod endpoints; -pub use self::endpoints::{ - Endpoints, - CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse, - DeleteCollectionNamespacedEndpointsResponse, - DeleteNamespacedEndpointsResponse, - ListEndpointsForAllNamespacesResponse, - ListNamespacedEndpointsResponse, - PatchNamespacedEndpointsResponse, - ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse, - ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse, - WatchEndpointsForAllNamespacesResponse, - WatchNamespacedEndpointsResponse, -}; +pub use self::endpoints::Endpoints; +#[cfg(feature = "api")] pub use self::endpoints::{CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::DeleteCollectionNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::DeleteNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::PatchNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::{ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::{ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::WatchEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::WatchNamespacedEndpointsResponse; mod endpoints_list; -pub use self::endpoints_list::{ - EndpointsList, -}; +pub use self::endpoints_list::EndpointsList; mod env_from_source; -pub use self::env_from_source::{ - EnvFromSource, -}; +pub use self::env_from_source::EnvFromSource; mod env_var; -pub use self::env_var::{ - EnvVar, -}; +pub use self::env_var::EnvVar; mod env_var_source; -pub use self::env_var_source::{ - EnvVarSource, -}; +pub use self::env_var_source::EnvVarSource; mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; mod event_source; -pub use self::event_source::{ - EventSource, -}; +pub use self::event_source::EventSource; mod exec_action; -pub use self::exec_action::{ - ExecAction, -}; +pub use self::exec_action::ExecAction; mod fc_volume_source; -pub use self::fc_volume_source::{ - FCVolumeSource, -}; +pub use self::fc_volume_source::FCVolumeSource; mod flex_persistent_volume_source; -pub use self::flex_persistent_volume_source::{ - FlexPersistentVolumeSource, -}; +pub use self::flex_persistent_volume_source::FlexPersistentVolumeSource; mod flex_volume_source; -pub use self::flex_volume_source::{ - FlexVolumeSource, -}; +pub use self::flex_volume_source::FlexVolumeSource; mod flocker_volume_source; -pub use self::flocker_volume_source::{ - FlockerVolumeSource, -}; +pub use self::flocker_volume_source::FlockerVolumeSource; mod gce_persistent_disk_volume_source; -pub use self::gce_persistent_disk_volume_source::{ - GCEPersistentDiskVolumeSource, -}; +pub use self::gce_persistent_disk_volume_source::GCEPersistentDiskVolumeSource; mod git_repo_volume_source; -pub use self::git_repo_volume_source::{ - GitRepoVolumeSource, -}; +pub use self::git_repo_volume_source::GitRepoVolumeSource; mod glusterfs_volume_source; -pub use self::glusterfs_volume_source::{ - GlusterfsVolumeSource, -}; +pub use self::glusterfs_volume_source::GlusterfsVolumeSource; mod http_get_action; -pub use self::http_get_action::{ - HTTPGetAction, -}; +pub use self::http_get_action::HTTPGetAction; mod http_header; -pub use self::http_header::{ - HTTPHeader, -}; +pub use self::http_header::HTTPHeader; mod handler; -pub use self::handler::{ - Handler, -}; +pub use self::handler::Handler; mod host_alias; -pub use self::host_alias::{ - HostAlias, -}; +pub use self::host_alias::HostAlias; mod host_path_volume_source; -pub use self::host_path_volume_source::{ - HostPathVolumeSource, -}; +pub use self::host_path_volume_source::HostPathVolumeSource; mod iscsi_persistent_volume_source; -pub use self::iscsi_persistent_volume_source::{ - ISCSIPersistentVolumeSource, -}; +pub use self::iscsi_persistent_volume_source::ISCSIPersistentVolumeSource; mod iscsi_volume_source; -pub use self::iscsi_volume_source::{ - ISCSIVolumeSource, -}; +pub use self::iscsi_volume_source::ISCSIVolumeSource; mod key_to_path; -pub use self::key_to_path::{ - KeyToPath, -}; +pub use self::key_to_path::KeyToPath; mod lifecycle; -pub use self::lifecycle::{ - Lifecycle, -}; +pub use self::lifecycle::Lifecycle; mod limit_range; -pub use self::limit_range::{ - LimitRange, - CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse, - DeleteCollectionNamespacedLimitRangeResponse, - DeleteNamespacedLimitRangeResponse, - ListLimitRangeForAllNamespacesResponse, - ListNamespacedLimitRangeResponse, - PatchNamespacedLimitRangeResponse, - ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse, - ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse, - WatchLimitRangeForAllNamespacesResponse, - WatchNamespacedLimitRangeResponse, -}; +pub use self::limit_range::LimitRange; +#[cfg(feature = "api")] pub use self::limit_range::{CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::DeleteCollectionNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::DeleteNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::PatchNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::{ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::{ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::WatchLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::WatchNamespacedLimitRangeResponse; mod limit_range_item; -pub use self::limit_range_item::{ - LimitRangeItem, -}; +pub use self::limit_range_item::LimitRangeItem; mod limit_range_list; -pub use self::limit_range_list::{ - LimitRangeList, -}; +pub use self::limit_range_list::LimitRangeList; mod limit_range_spec; -pub use self::limit_range_spec::{ - LimitRangeSpec, -}; +pub use self::limit_range_spec::LimitRangeSpec; mod load_balancer_ingress; -pub use self::load_balancer_ingress::{ - LoadBalancerIngress, -}; +pub use self::load_balancer_ingress::LoadBalancerIngress; mod load_balancer_status; -pub use self::load_balancer_status::{ - LoadBalancerStatus, -}; +pub use self::load_balancer_status::LoadBalancerStatus; mod local_object_reference; -pub use self::local_object_reference::{ - LocalObjectReference, -}; +pub use self::local_object_reference::LocalObjectReference; mod local_volume_source; -pub use self::local_volume_source::{ - LocalVolumeSource, -}; +pub use self::local_volume_source::LocalVolumeSource; mod nfs_volume_source; -pub use self::nfs_volume_source::{ - NFSVolumeSource, -}; +pub use self::nfs_volume_source::NFSVolumeSource; mod namespace; -pub use self::namespace::{ - Namespace, - CreateNamespaceOptional, CreateNamespaceResponse, - DeleteNamespaceResponse, - ListNamespaceResponse, - PatchNamespaceResponse, - PatchNamespaceStatusResponse, - ReadNamespaceOptional, ReadNamespaceResponse, - ReadNamespaceStatusOptional, ReadNamespaceStatusResponse, - ReplaceNamespaceOptional, ReplaceNamespaceResponse, - ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse, - ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse, - WatchNamespaceResponse, -}; +pub use self::namespace::Namespace; +#[cfg(feature = "api")] pub use self::namespace::{CreateNamespaceOptional, CreateNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::DeleteNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::ListNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceStatusResponse; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceOptional, ReadNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceStatusOptional, ReadNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceOptional, ReplaceNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::WatchNamespaceResponse; mod namespace_list; -pub use self::namespace_list::{ - NamespaceList, -}; +pub use self::namespace_list::NamespaceList; mod namespace_spec; -pub use self::namespace_spec::{ - NamespaceSpec, -}; +pub use self::namespace_spec::NamespaceSpec; mod namespace_status; -pub use self::namespace_status::{ - NamespaceStatus, -}; +pub use self::namespace_status::NamespaceStatus; mod node; -pub use self::node::{ - Node, - ConnectDeleteNodeProxyOptional, - ConnectDeleteNodeProxyWithPathOptional, - ConnectGetNodeProxyOptional, - ConnectGetNodeProxyWithPathOptional, - ConnectPatchNodeProxyOptional, - ConnectPatchNodeProxyWithPathOptional, - ConnectPostNodeProxyOptional, - ConnectPostNodeProxyWithPathOptional, - ConnectPutNodeProxyOptional, - ConnectPutNodeProxyWithPathOptional, - CreateNodeOptional, CreateNodeResponse, - DeleteCollectionNodeResponse, - DeleteNodeResponse, - ListNodeResponse, - PatchNodeResponse, - PatchNodeStatusResponse, - ReadNodeOptional, ReadNodeResponse, - ReadNodeStatusOptional, ReadNodeStatusResponse, - ReplaceNodeOptional, ReplaceNodeResponse, - ReplaceNodeStatusOptional, ReplaceNodeStatusResponse, - WatchNodeResponse, -}; +pub use self::node::Node; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::{CreateNodeOptional, CreateNodeResponse}; +#[cfg(feature = "api")] pub use self::node::DeleteCollectionNodeResponse; +#[cfg(feature = "api")] pub use self::node::DeleteNodeResponse; +#[cfg(feature = "api")] pub use self::node::ListNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeStatusResponse; +#[cfg(feature = "api")] pub use self::node::{ReadNodeOptional, ReadNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReadNodeStatusOptional, ReadNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeOptional, ReplaceNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeStatusOptional, ReplaceNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::WatchNodeResponse; mod node_address; -pub use self::node_address::{ - NodeAddress, -}; +pub use self::node_address::NodeAddress; mod node_affinity; -pub use self::node_affinity::{ - NodeAffinity, -}; +pub use self::node_affinity::NodeAffinity; mod node_condition; -pub use self::node_condition::{ - NodeCondition, -}; +pub use self::node_condition::NodeCondition; mod node_config_source; -pub use self::node_config_source::{ - NodeConfigSource, -}; +pub use self::node_config_source::NodeConfigSource; mod node_daemon_endpoints; -pub use self::node_daemon_endpoints::{ - NodeDaemonEndpoints, -}; +pub use self::node_daemon_endpoints::NodeDaemonEndpoints; mod node_list; -pub use self::node_list::{ - NodeList, -}; +pub use self::node_list::NodeList; mod node_selector; -pub use self::node_selector::{ - NodeSelector, -}; +pub use self::node_selector::NodeSelector; mod node_selector_requirement; -pub use self::node_selector_requirement::{ - NodeSelectorRequirement, -}; +pub use self::node_selector_requirement::NodeSelectorRequirement; mod node_selector_term; -pub use self::node_selector_term::{ - NodeSelectorTerm, -}; +pub use self::node_selector_term::NodeSelectorTerm; mod node_spec; -pub use self::node_spec::{ - NodeSpec, -}; +pub use self::node_spec::NodeSpec; mod node_status; -pub use self::node_status::{ - NodeStatus, -}; +pub use self::node_status::NodeStatus; mod node_system_info; -pub use self::node_system_info::{ - NodeSystemInfo, -}; +pub use self::node_system_info::NodeSystemInfo; mod object_field_selector; -pub use self::object_field_selector::{ - ObjectFieldSelector, -}; +pub use self::object_field_selector::ObjectFieldSelector; mod object_reference; -pub use self::object_reference::{ - ObjectReference, -}; +pub use self::object_reference::ObjectReference; mod persistent_volume; -pub use self::persistent_volume::{ - PersistentVolume, - CreatePersistentVolumeOptional, CreatePersistentVolumeResponse, - DeleteCollectionPersistentVolumeResponse, - DeletePersistentVolumeResponse, - ListPersistentVolumeResponse, - PatchPersistentVolumeResponse, - PatchPersistentVolumeStatusResponse, - ReadPersistentVolumeOptional, ReadPersistentVolumeResponse, - ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse, - ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse, - ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse, - WatchPersistentVolumeResponse, -}; +pub use self::persistent_volume::PersistentVolume; +#[cfg(feature = "api")] pub use self::persistent_volume::{CreatePersistentVolumeOptional, CreatePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::DeleteCollectionPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::DeletePersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::ListPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeOptional, ReadPersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::WatchPersistentVolumeResponse; mod persistent_volume_claim; -pub use self::persistent_volume_claim::{ - PersistentVolumeClaim, - CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse, - DeleteCollectionNamespacedPersistentVolumeClaimResponse, - DeleteNamespacedPersistentVolumeClaimResponse, - ListNamespacedPersistentVolumeClaimResponse, - ListPersistentVolumeClaimForAllNamespacesResponse, - PatchNamespacedPersistentVolumeClaimResponse, - PatchNamespacedPersistentVolumeClaimStatusResponse, - ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse, - ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse, - ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse, - ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse, - WatchNamespacedPersistentVolumeClaimResponse, - WatchPersistentVolumeClaimForAllNamespacesResponse, -}; +pub use self::persistent_volume_claim::PersistentVolumeClaim; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteCollectionNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListPersistentVolumeClaimForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchPersistentVolumeClaimForAllNamespacesResponse; mod persistent_volume_claim_condition; -pub use self::persistent_volume_claim_condition::{ - PersistentVolumeClaimCondition, -}; +pub use self::persistent_volume_claim_condition::PersistentVolumeClaimCondition; mod persistent_volume_claim_list; -pub use self::persistent_volume_claim_list::{ - PersistentVolumeClaimList, -}; +pub use self::persistent_volume_claim_list::PersistentVolumeClaimList; mod persistent_volume_claim_spec; -pub use self::persistent_volume_claim_spec::{ - PersistentVolumeClaimSpec, -}; +pub use self::persistent_volume_claim_spec::PersistentVolumeClaimSpec; mod persistent_volume_claim_status; -pub use self::persistent_volume_claim_status::{ - PersistentVolumeClaimStatus, -}; +pub use self::persistent_volume_claim_status::PersistentVolumeClaimStatus; mod persistent_volume_claim_volume_source; -pub use self::persistent_volume_claim_volume_source::{ - PersistentVolumeClaimVolumeSource, -}; +pub use self::persistent_volume_claim_volume_source::PersistentVolumeClaimVolumeSource; mod persistent_volume_list; -pub use self::persistent_volume_list::{ - PersistentVolumeList, -}; +pub use self::persistent_volume_list::PersistentVolumeList; mod persistent_volume_spec; -pub use self::persistent_volume_spec::{ - PersistentVolumeSpec, -}; +pub use self::persistent_volume_spec::PersistentVolumeSpec; mod persistent_volume_status; -pub use self::persistent_volume_status::{ - PersistentVolumeStatus, -}; +pub use self::persistent_volume_status::PersistentVolumeStatus; mod photon_persistent_disk_volume_source; -pub use self::photon_persistent_disk_volume_source::{ - PhotonPersistentDiskVolumeSource, -}; +pub use self::photon_persistent_disk_volume_source::PhotonPersistentDiskVolumeSource; mod pod; -pub use self::pod::{ - Pod, - ConnectDeleteNamespacedPodProxyOptional, - ConnectDeleteNamespacedPodProxyWithPathOptional, - ConnectGetNamespacedPodAttachOptional, - ConnectGetNamespacedPodExecOptional, - ConnectGetNamespacedPodPortforwardOptional, - ConnectGetNamespacedPodProxyOptional, - ConnectGetNamespacedPodProxyWithPathOptional, - ConnectPatchNamespacedPodProxyOptional, - ConnectPatchNamespacedPodProxyWithPathOptional, - ConnectPostNamespacedPodAttachOptional, - ConnectPostNamespacedPodExecOptional, - ConnectPostNamespacedPodPortforwardOptional, - ConnectPostNamespacedPodProxyOptional, - ConnectPostNamespacedPodProxyWithPathOptional, - ConnectPutNamespacedPodProxyOptional, - ConnectPutNamespacedPodProxyWithPathOptional, - CreateNamespacedPodOptional, CreateNamespacedPodResponse, - DeleteCollectionNamespacedPodResponse, - DeleteNamespacedPodResponse, - ListNamespacedPodResponse, - ListPodForAllNamespacesResponse, - PatchNamespacedPodResponse, - PatchNamespacedPodStatusResponse, - ReadNamespacedPodOptional, ReadNamespacedPodResponse, - ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse, - ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse, - ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse, - ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse, - WatchNamespacedPodResponse, - WatchPodForAllNamespacesResponse, -}; +pub use self::pod::Pod; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::{CreateNamespacedPodOptional, CreateNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::DeleteCollectionNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::DeleteNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListPodForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodStatusResponse; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodOptional, ReadNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::WatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::WatchPodForAllNamespacesResponse; mod pod_affinity; -pub use self::pod_affinity::{ - PodAffinity, -}; +pub use self::pod_affinity::PodAffinity; mod pod_affinity_term; -pub use self::pod_affinity_term::{ - PodAffinityTerm, -}; +pub use self::pod_affinity_term::PodAffinityTerm; mod pod_anti_affinity; -pub use self::pod_anti_affinity::{ - PodAntiAffinity, -}; +pub use self::pod_anti_affinity::PodAntiAffinity; mod pod_condition; -pub use self::pod_condition::{ - PodCondition, -}; +pub use self::pod_condition::PodCondition; mod pod_dns_config; -pub use self::pod_dns_config::{ - PodDNSConfig, -}; +pub use self::pod_dns_config::PodDNSConfig; mod pod_dns_config_option; -pub use self::pod_dns_config_option::{ - PodDNSConfigOption, -}; +pub use self::pod_dns_config_option::PodDNSConfigOption; mod pod_list; -pub use self::pod_list::{ - PodList, -}; +pub use self::pod_list::PodList; mod pod_security_context; -pub use self::pod_security_context::{ - PodSecurityContext, -}; +pub use self::pod_security_context::PodSecurityContext; mod pod_spec; -pub use self::pod_spec::{ - PodSpec, -}; +pub use self::pod_spec::PodSpec; mod pod_status; -pub use self::pod_status::{ - PodStatus, -}; +pub use self::pod_status::PodStatus; mod pod_template; -pub use self::pod_template::{ - PodTemplate, - CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse, - DeleteCollectionNamespacedPodTemplateResponse, - DeleteNamespacedPodTemplateResponse, - ListNamespacedPodTemplateResponse, - ListPodTemplateForAllNamespacesResponse, - PatchNamespacedPodTemplateResponse, - ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse, - ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse, - WatchNamespacedPodTemplateResponse, - WatchPodTemplateForAllNamespacesResponse, -}; +pub use self::pod_template::PodTemplate; +#[cfg(feature = "api")] pub use self::pod_template::{CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::DeleteCollectionNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::DeleteNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListPodTemplateForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_template::PatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::{ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::{ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::WatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::WatchPodTemplateForAllNamespacesResponse; mod pod_template_list; -pub use self::pod_template_list::{ - PodTemplateList, -}; +pub use self::pod_template_list::PodTemplateList; mod pod_template_spec; -pub use self::pod_template_spec::{ - PodTemplateSpec, -}; +pub use self::pod_template_spec::PodTemplateSpec; mod portworx_volume_source; -pub use self::portworx_volume_source::{ - PortworxVolumeSource, -}; +pub use self::portworx_volume_source::PortworxVolumeSource; mod preferred_scheduling_term; -pub use self::preferred_scheduling_term::{ - PreferredSchedulingTerm, -}; +pub use self::preferred_scheduling_term::PreferredSchedulingTerm; mod probe; -pub use self::probe::{ - Probe, -}; +pub use self::probe::Probe; mod projected_volume_source; -pub use self::projected_volume_source::{ - ProjectedVolumeSource, -}; +pub use self::projected_volume_source::ProjectedVolumeSource; mod quobyte_volume_source; -pub use self::quobyte_volume_source::{ - QuobyteVolumeSource, -}; +pub use self::quobyte_volume_source::QuobyteVolumeSource; mod rbd_persistent_volume_source; -pub use self::rbd_persistent_volume_source::{ - RBDPersistentVolumeSource, -}; +pub use self::rbd_persistent_volume_source::RBDPersistentVolumeSource; mod rbd_volume_source; -pub use self::rbd_volume_source::{ - RBDVolumeSource, -}; +pub use self::rbd_volume_source::RBDVolumeSource; mod replication_controller; -pub use self::replication_controller::{ - ReplicationController, - CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse, - DeleteCollectionNamespacedReplicationControllerResponse, - DeleteNamespacedReplicationControllerResponse, - ListNamespacedReplicationControllerResponse, - ListReplicationControllerForAllNamespacesResponse, - PatchNamespacedReplicationControllerResponse, - PatchNamespacedReplicationControllerStatusResponse, - ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse, - ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse, - ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse, - ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse, - WatchNamespacedReplicationControllerResponse, - WatchReplicationControllerForAllNamespacesResponse, -}; +pub use self::replication_controller::ReplicationController; +#[cfg(feature = "api")] pub use self::replication_controller::{CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteCollectionNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListReplicationControllerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerStatusResponse; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::WatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::WatchReplicationControllerForAllNamespacesResponse; mod replication_controller_condition; -pub use self::replication_controller_condition::{ - ReplicationControllerCondition, -}; +pub use self::replication_controller_condition::ReplicationControllerCondition; mod replication_controller_list; -pub use self::replication_controller_list::{ - ReplicationControllerList, -}; +pub use self::replication_controller_list::ReplicationControllerList; mod replication_controller_spec; -pub use self::replication_controller_spec::{ - ReplicationControllerSpec, -}; +pub use self::replication_controller_spec::ReplicationControllerSpec; mod replication_controller_status; -pub use self::replication_controller_status::{ - ReplicationControllerStatus, -}; +pub use self::replication_controller_status::ReplicationControllerStatus; mod resource_field_selector; -pub use self::resource_field_selector::{ - ResourceFieldSelector, -}; +pub use self::resource_field_selector::ResourceFieldSelector; mod resource_quota; -pub use self::resource_quota::{ - ResourceQuota, - CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse, - DeleteCollectionNamespacedResourceQuotaResponse, - DeleteNamespacedResourceQuotaResponse, - ListNamespacedResourceQuotaResponse, - ListResourceQuotaForAllNamespacesResponse, - PatchNamespacedResourceQuotaResponse, - PatchNamespacedResourceQuotaStatusResponse, - ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse, - ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse, - ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse, - ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse, - WatchNamespacedResourceQuotaResponse, - WatchResourceQuotaForAllNamespacesResponse, -}; +pub use self::resource_quota::ResourceQuota; +#[cfg(feature = "api")] pub use self::resource_quota::{CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteCollectionNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListResourceQuotaForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaStatusResponse; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::WatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::WatchResourceQuotaForAllNamespacesResponse; mod resource_quota_list; -pub use self::resource_quota_list::{ - ResourceQuotaList, -}; +pub use self::resource_quota_list::ResourceQuotaList; mod resource_quota_spec; -pub use self::resource_quota_spec::{ - ResourceQuotaSpec, -}; +pub use self::resource_quota_spec::ResourceQuotaSpec; mod resource_quota_status; -pub use self::resource_quota_status::{ - ResourceQuotaStatus, -}; +pub use self::resource_quota_status::ResourceQuotaStatus; mod resource_requirements; -pub use self::resource_requirements::{ - ResourceRequirements, -}; +pub use self::resource_requirements::ResourceRequirements; mod se_linux_options; -pub use self::se_linux_options::{ - SELinuxOptions, -}; +pub use self::se_linux_options::SELinuxOptions; mod scale_io_persistent_volume_source; -pub use self::scale_io_persistent_volume_source::{ - ScaleIOPersistentVolumeSource, -}; +pub use self::scale_io_persistent_volume_source::ScaleIOPersistentVolumeSource; mod scale_io_volume_source; -pub use self::scale_io_volume_source::{ - ScaleIOVolumeSource, -}; +pub use self::scale_io_volume_source::ScaleIOVolumeSource; mod secret; -pub use self::secret::{ - Secret, - CreateNamespacedSecretOptional, CreateNamespacedSecretResponse, - DeleteCollectionNamespacedSecretResponse, - DeleteNamespacedSecretResponse, - ListNamespacedSecretResponse, - ListSecretForAllNamespacesResponse, - PatchNamespacedSecretResponse, - ReadNamespacedSecretOptional, ReadNamespacedSecretResponse, - ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse, - WatchNamespacedSecretResponse, - WatchSecretForAllNamespacesResponse, -}; +pub use self::secret::Secret; +#[cfg(feature = "api")] pub use self::secret::{CreateNamespacedSecretOptional, CreateNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::DeleteCollectionNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::DeleteNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListSecretForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::secret::PatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::{ReadNamespacedSecretOptional, ReadNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::{ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::WatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::WatchSecretForAllNamespacesResponse; mod secret_env_source; -pub use self::secret_env_source::{ - SecretEnvSource, -}; +pub use self::secret_env_source::SecretEnvSource; mod secret_key_selector; -pub use self::secret_key_selector::{ - SecretKeySelector, -}; +pub use self::secret_key_selector::SecretKeySelector; mod secret_list; -pub use self::secret_list::{ - SecretList, -}; +pub use self::secret_list::SecretList; mod secret_projection; -pub use self::secret_projection::{ - SecretProjection, -}; +pub use self::secret_projection::SecretProjection; mod secret_reference; -pub use self::secret_reference::{ - SecretReference, -}; +pub use self::secret_reference::SecretReference; mod secret_volume_source; -pub use self::secret_volume_source::{ - SecretVolumeSource, -}; +pub use self::secret_volume_source::SecretVolumeSource; mod security_context; -pub use self::security_context::{ - SecurityContext, -}; +pub use self::security_context::SecurityContext; mod service; -pub use self::service::{ - Service, - ConnectDeleteNamespacedServiceProxyOptional, - ConnectDeleteNamespacedServiceProxyWithPathOptional, - ConnectGetNamespacedServiceProxyOptional, - ConnectGetNamespacedServiceProxyWithPathOptional, - ConnectPatchNamespacedServiceProxyOptional, - ConnectPatchNamespacedServiceProxyWithPathOptional, - ConnectPostNamespacedServiceProxyOptional, - ConnectPostNamespacedServiceProxyWithPathOptional, - ConnectPutNamespacedServiceProxyOptional, - ConnectPutNamespacedServiceProxyWithPathOptional, - CreateNamespacedServiceOptional, CreateNamespacedServiceResponse, - DeleteNamespacedServiceResponse, - ListNamespacedServiceResponse, - ListServiceForAllNamespacesResponse, - PatchNamespacedServiceResponse, - PatchNamespacedServiceStatusResponse, - ReadNamespacedServiceOptional, ReadNamespacedServiceResponse, - ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse, - ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse, - ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse, - WatchNamespacedServiceResponse, - WatchServiceForAllNamespacesResponse, -}; +pub use self::service::Service; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::{CreateNamespacedServiceOptional, CreateNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::DeleteNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListServiceForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceStatusResponse; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceOptional, ReadNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::WatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::WatchServiceForAllNamespacesResponse; mod service_account; -pub use self::service_account::{ - ServiceAccount, - CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse, - DeleteCollectionNamespacedServiceAccountResponse, - DeleteNamespacedServiceAccountResponse, - ListNamespacedServiceAccountResponse, - ListServiceAccountForAllNamespacesResponse, - PatchNamespacedServiceAccountResponse, - ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse, - ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse, - WatchNamespacedServiceAccountResponse, - WatchServiceAccountForAllNamespacesResponse, -}; +pub use self::service_account::ServiceAccount; +#[cfg(feature = "api")] pub use self::service_account::{CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::DeleteCollectionNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::DeleteNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListServiceAccountForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service_account::PatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::{ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::{ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::WatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::WatchServiceAccountForAllNamespacesResponse; mod service_account_list; -pub use self::service_account_list::{ - ServiceAccountList, -}; +pub use self::service_account_list::ServiceAccountList; mod service_list; -pub use self::service_list::{ - ServiceList, -}; +pub use self::service_list::ServiceList; mod service_port; -pub use self::service_port::{ - ServicePort, -}; +pub use self::service_port::ServicePort; mod service_spec; -pub use self::service_spec::{ - ServiceSpec, -}; +pub use self::service_spec::ServiceSpec; mod service_status; -pub use self::service_status::{ - ServiceStatus, -}; +pub use self::service_status::ServiceStatus; mod session_affinity_config; -pub use self::session_affinity_config::{ - SessionAffinityConfig, -}; +pub use self::session_affinity_config::SessionAffinityConfig; mod storage_os_persistent_volume_source; -pub use self::storage_os_persistent_volume_source::{ - StorageOSPersistentVolumeSource, -}; +pub use self::storage_os_persistent_volume_source::StorageOSPersistentVolumeSource; mod storage_os_volume_source; -pub use self::storage_os_volume_source::{ - StorageOSVolumeSource, -}; +pub use self::storage_os_volume_source::StorageOSVolumeSource; mod tcp_socket_action; -pub use self::tcp_socket_action::{ - TCPSocketAction, -}; +pub use self::tcp_socket_action::TCPSocketAction; mod taint; -pub use self::taint::{ - Taint, -}; +pub use self::taint::Taint; mod toleration; -pub use self::toleration::{ - Toleration, -}; +pub use self::toleration::Toleration; mod volume; -pub use self::volume::{ - Volume, -}; +pub use self::volume::Volume; mod volume_device; -pub use self::volume_device::{ - VolumeDevice, -}; +pub use self::volume_device::VolumeDevice; mod volume_mount; -pub use self::volume_mount::{ - VolumeMount, -}; +pub use self::volume_mount::VolumeMount; mod volume_node_affinity; -pub use self::volume_node_affinity::{ - VolumeNodeAffinity, -}; +pub use self::volume_node_affinity::VolumeNodeAffinity; mod volume_projection; -pub use self::volume_projection::{ - VolumeProjection, -}; +pub use self::volume_projection::VolumeProjection; mod vsphere_virtual_disk_volume_source; -pub use self::vsphere_virtual_disk_volume_source::{ - VsphereVirtualDiskVolumeSource, -}; +pub use self::vsphere_virtual_disk_volume_source::VsphereVirtualDiskVolumeSource; mod weighted_pod_affinity_term; -pub use self::weighted_pod_affinity_term::{ - WeightedPodAffinityTerm, -}; +pub use self::weighted_pod_affinity_term::WeightedPodAffinityTerm; diff --git a/src/v1_10/api/core/v1/namespace.rs b/src/v1_10/api/core/v1/namespace.rs index c357bfa980..b640105338 100644 --- a/src/v1_10/api/core/v1/namespace.rs +++ b/src/v1_10/api/core/v1/namespace.rs @@ -29,6 +29,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespace( body: &crate::v1_10::api::core::v1::Namespace, optional: CreateNamespaceOptional<'_>, @@ -54,6 +55,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespaceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespaceResponse { Ok(crate::v1_10::api::core::v1::Namespace), @@ -69,6 +72,7 @@ pub enum CreateNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespace( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::delete_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespaceResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespace( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -230,12 +238,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::list_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespaceResponse { Ok(crate::v1_10::api::core::v1::NamespaceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -283,6 +293,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -310,12 +321,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceResponse { Ok(crate::v1_10::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -363,6 +376,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace_status( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -390,12 +404,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceStatusResponse { Ok(crate::v1_10::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -441,6 +457,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace( name: &str, optional: ReadNamespaceOptional<'_>, @@ -475,6 +492,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -486,12 +504,14 @@ pub struct ReadNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceResponse { Ok(crate::v1_10::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -537,6 +557,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace_status( name: &str, optional: ReadNamespaceStatusOptional<'_>, @@ -563,6 +584,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -570,12 +592,14 @@ pub struct ReadNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceStatusResponse { Ok(crate::v1_10::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -623,6 +647,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace( name: &str, body: &crate::v1_10::api::core::v1::Namespace, @@ -651,6 +676,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -658,6 +684,7 @@ pub struct ReplaceNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceResponse { Ok(crate::v1_10::api::core::v1::Namespace), @@ -665,6 +692,7 @@ pub enum ReplaceNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +748,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_finalize( name: &str, body: &crate::v1_10::api::core::v1::Namespace, @@ -748,6 +777,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceFinalizeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,6 +785,7 @@ pub struct ReplaceNamespaceFinalizeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceFinalizeResponse { Ok(crate::v1_10::api::core::v1::Namespace), @@ -762,6 +793,7 @@ pub enum ReplaceNamespaceFinalizeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceFinalizeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -817,6 +849,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_status( name: &str, body: &crate::v1_10::api::core::v1::Namespace, @@ -845,6 +878,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -852,6 +886,7 @@ pub struct ReplaceNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceStatusResponse { Ok(crate::v1_10::api::core::v1::Namespace), @@ -859,6 +894,7 @@ pub enum ReplaceNamespaceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -910,6 +946,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespace( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -928,12 +965,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::watch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespaceResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/node.rs b/src/v1_10/api/core/v1/node.rs index 35f2ef26fc..0f1a0229cc 100644 --- a/src/v1_10/api/core/v1/node.rs +++ b/src/v1_10/api/core/v1/node.rs @@ -29,6 +29,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy( name: &str, optional: ConnectDeleteNodeProxyOptional<'_>, @@ -52,6 +53,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -76,6 +78,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy_with_path( name: &str, path: &str, @@ -101,6 +104,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -121,6 +125,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy( name: &str, optional: ConnectGetNodeProxyOptional<'_>, @@ -144,6 +149,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -168,6 +174,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy_with_path( name: &str, path: &str, @@ -193,6 +200,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -213,6 +221,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy( name: &str, optional: ConnectPatchNodeProxyOptional<'_>, @@ -236,6 +245,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -260,6 +270,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy_with_path( name: &str, path: &str, @@ -285,6 +296,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -305,6 +317,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy( name: &str, optional: ConnectPostNodeProxyOptional<'_>, @@ -328,6 +341,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -352,6 +366,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy_with_path( name: &str, path: &str, @@ -377,6 +392,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -397,6 +413,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy( name: &str, optional: ConnectPutNodeProxyOptional<'_>, @@ -420,6 +437,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -444,6 +462,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy_with_path( name: &str, path: &str, @@ -469,6 +488,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -489,6 +509,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_node( body: &crate::v1_10::api::core::v1::Node, optional: CreateNodeOptional<'_>, @@ -514,6 +535,7 @@ impl Node { } /// Optional parameters of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNodeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -521,6 +543,7 @@ pub struct CreateNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNodeResponse { Ok(crate::v1_10::api::core::v1::Node), @@ -529,6 +552,7 @@ pub enum CreateNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -590,6 +614,7 @@ impl Node { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_node( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -610,6 +635,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_collection_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNodeResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -617,6 +643,7 @@ pub enum DeleteCollectionNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +702,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_node( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -694,6 +722,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNodeResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -701,6 +730,7 @@ pub enum DeleteNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -757,6 +787,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_node( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -775,12 +806,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::list_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNodeResponse { Ok(crate::v1_10::api::core::v1::NodeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -828,6 +861,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -855,12 +889,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeResponse { Ok(crate::v1_10::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -908,6 +944,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node_status( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -935,12 +972,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeStatusResponse { Ok(crate::v1_10::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -986,6 +1025,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node( name: &str, optional: ReadNodeOptional<'_>, @@ -1020,6 +1060,7 @@ impl Node { } /// Optional parameters of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1031,12 +1072,14 @@ pub struct ReadNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeResponse { Ok(crate::v1_10::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1082,6 +1125,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node_status( name: &str, optional: ReadNodeStatusOptional<'_>, @@ -1108,6 +1152,7 @@ impl Node { } /// Optional parameters of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1115,12 +1160,14 @@ pub struct ReadNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeStatusResponse { Ok(crate::v1_10::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1168,6 +1215,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node( name: &str, body: &crate::v1_10::api::core::v1::Node, @@ -1196,6 +1244,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1203,6 +1252,7 @@ pub struct ReplaceNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeResponse { Ok(crate::v1_10::api::core::v1::Node), @@ -1210,6 +1260,7 @@ pub enum ReplaceNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1265,6 +1316,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node_status( name: &str, body: &crate::v1_10::api::core::v1::Node, @@ -1293,6 +1345,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1300,6 +1353,7 @@ pub struct ReplaceNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeStatusResponse { Ok(crate::v1_10::api::core::v1::Node), @@ -1307,6 +1361,7 @@ pub enum ReplaceNodeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1358,6 +1413,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_node( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1376,12 +1432,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::watch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNodeResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/persistent_volume.rs b/src/v1_10/api/core/v1/persistent_volume.rs index 590d66eb23..591b52bff1 100644 --- a/src/v1_10/api/core/v1/persistent_volume.rs +++ b/src/v1_10/api/core/v1/persistent_volume.rs @@ -29,6 +29,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_persistent_volume( body: &crate::v1_10::api::core::v1::PersistentVolume, optional: CreatePersistentVolumeOptional<'_>, @@ -54,6 +55,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePersistentVolumeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreatePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePersistentVolumeResponse { Ok(crate::v1_10::api::core::v1::PersistentVolume), @@ -69,6 +72,7 @@ pub enum CreatePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl PersistentVolume { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_persistent_volume( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -150,6 +155,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_collection_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPersistentVolumeResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -157,6 +163,7 @@ pub enum DeleteCollectionPersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_persistent_volume( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -234,6 +242,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePersistentVolumeResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeletePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::list_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeResponse { Ok(crate::v1_10::api::core::v1::PersistentVolumeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeResponse { Ok(crate::v1_10::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume_status( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -475,12 +492,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeStatusResponse { Ok(crate::v1_10::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -526,6 +545,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume( name: &str, optional: ReadPersistentVolumeOptional<'_>, @@ -560,6 +580,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -571,12 +592,14 @@ pub struct ReadPersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeResponse { Ok(crate::v1_10::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -622,6 +645,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume_status( name: &str, optional: ReadPersistentVolumeStatusOptional<'_>, @@ -648,6 +672,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -655,12 +680,14 @@ pub struct ReadPersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeStatusResponse { Ok(crate::v1_10::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -708,6 +735,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume( name: &str, body: &crate::v1_10::api::core::v1::PersistentVolume, @@ -736,6 +764,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -743,6 +772,7 @@ pub struct ReplacePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeResponse { Ok(crate::v1_10::api::core::v1::PersistentVolume), @@ -750,6 +780,7 @@ pub enum ReplacePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -805,6 +836,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume_status( name: &str, body: &crate::v1_10::api::core::v1::PersistentVolume, @@ -833,6 +865,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -840,6 +873,7 @@ pub struct ReplacePersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeStatusResponse { Ok(crate::v1_10::api::core::v1::PersistentVolume), @@ -847,6 +881,7 @@ pub enum ReplacePersistentVolumeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -898,6 +933,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -916,12 +952,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::watch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/persistent_volume_claim.rs b/src/v1_10/api/core/v1/persistent_volume_claim.rs index fe0d72f68c..e7b5789da1 100644 --- a/src/v1_10/api/core/v1/persistent_volume_claim.rs +++ b/src/v1_10/api/core/v1/persistent_volume_claim.rs @@ -33,6 +33,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_persistent_volume_claim( namespace: &str, body: &crate::v1_10::api::core::v1::PersistentVolumeClaim, @@ -61,6 +62,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_10::api::core::v1::PersistentVolumeClaim), @@ -76,6 +79,7 @@ pub enum CreateNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl PersistentVolumeClaim { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_persistent_volume_claim( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_collection_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -342,12 +353,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_10::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume_claim_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_10::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_10::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_10::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_10::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_10::api::core::v1::PersistentVolumeClaim), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_10::api::core::v1::PersistentVolumeClaim), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume_claim_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/pod.rs b/src/v1_10/api/core/v1/pod.rs index 83088cc899..da8f4a9f87 100644 --- a/src/v1_10/api/core/v1/pod.rs +++ b/src/v1_10/api/core/v1/pod.rs @@ -33,6 +33,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -86,6 +88,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -137,6 +141,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_attach( name: &str, namespace: &str, @@ -178,6 +183,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -210,6 +216,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_exec( name: &str, namespace: &str, @@ -255,6 +262,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -289,6 +297,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_portforward( name: &str, namespace: &str, @@ -314,6 +323,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -338,6 +348,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy( name: &str, namespace: &str, @@ -363,6 +374,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -391,6 +403,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -418,6 +431,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -442,6 +456,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy( name: &str, namespace: &str, @@ -467,6 +482,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -495,6 +511,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -522,6 +539,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -546,6 +564,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_attach( name: &str, namespace: &str, @@ -587,6 +606,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -619,6 +639,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_exec( name: &str, namespace: &str, @@ -664,6 +685,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -698,6 +720,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_portforward( name: &str, namespace: &str, @@ -723,6 +746,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -747,6 +771,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy( name: &str, namespace: &str, @@ -772,6 +797,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -800,6 +826,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -827,6 +854,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -851,6 +879,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy( name: &str, namespace: &str, @@ -876,6 +905,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -904,6 +934,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -931,6 +962,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -955,6 +987,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod( namespace: &str, body: &crate::v1_10::api::core::v1::Pod, @@ -983,6 +1016,7 @@ impl Pod { } /// Optional parameters of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodOptional<'a> { /// If 'true', then the output is pretty printed. @@ -990,6 +1024,7 @@ pub struct CreateNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodResponse { Ok(crate::v1_10::api::core::v1::Pod), @@ -998,6 +1033,7 @@ pub enum CreateNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1063,6 +1099,7 @@ impl Pod { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -1086,6 +1123,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_collection_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -1093,6 +1131,7 @@ pub enum DeleteCollectionNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1155,6 +1194,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod( name: &str, namespace: &str, @@ -1176,6 +1216,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -1183,6 +1224,7 @@ pub enum DeleteNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1243,6 +1285,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -1264,12 +1307,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodResponse { Ok(crate::v1_10::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1313,6 +1358,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1331,12 +1377,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1388,6 +1436,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod( name: &str, namespace: &str, @@ -1417,12 +1466,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodResponse { Ok(crate::v1_10::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1474,6 +1525,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_status( name: &str, namespace: &str, @@ -1503,12 +1555,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodStatusResponse { Ok(crate::v1_10::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1558,6 +1612,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod( name: &str, namespace: &str, @@ -1594,6 +1649,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1605,12 +1661,14 @@ pub struct ReadNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodResponse { Ok(crate::v1_10::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1660,6 +1718,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_log( name: &str, namespace: &str, @@ -1716,6 +1775,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodLogOptional<'a> { /// The container for which to stream logs. Defaults to only container if there is one container in the pod. @@ -1737,12 +1797,14 @@ pub struct ReadNamespacedPodLogOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodLogResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodLogResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1802,6 +1864,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_status( name: &str, namespace: &str, @@ -1830,6 +1893,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1837,12 +1901,14 @@ pub struct ReadNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodStatusResponse { Ok(crate::v1_10::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1894,6 +1960,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod( name: &str, namespace: &str, @@ -1924,6 +1991,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1931,6 +1999,7 @@ pub struct ReplaceNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodResponse { Ok(crate::v1_10::api::core::v1::Pod), @@ -1938,6 +2007,7 @@ pub enum ReplaceNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1997,6 +2067,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_status( name: &str, namespace: &str, @@ -2027,6 +2098,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2034,6 +2106,7 @@ pub struct ReplaceNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodStatusResponse { Ok(crate::v1_10::api::core::v1::Pod), @@ -2041,6 +2114,7 @@ pub enum ReplaceNamespacedPodStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2096,6 +2170,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -2117,12 +2192,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2168,6 +2245,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2186,12 +2264,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/pod_template.rs b/src/v1_10/api/core/v1/pod_template.rs index 119f2166af..1a055e57c1 100644 --- a/src/v1_10/api/core/v1/pod_template.rs +++ b/src/v1_10/api/core/v1/pod_template.rs @@ -30,6 +30,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_template( namespace: &str, body: &crate::v1_10::api::core::v1::PodTemplate, @@ -58,6 +59,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodTemplateOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodTemplateResponse { Ok(crate::v1_10::api::core::v1::PodTemplate), @@ -73,6 +76,7 @@ pub enum CreateNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl PodTemplate { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_template( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_collection_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodTemplateResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_template( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodTemplateResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_template( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -339,12 +350,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodTemplateResponse { Ok(crate::v1_10::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_template_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodTemplateForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_template( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::patch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodTemplateResponse { Ok(crate::v1_10::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_template( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodTemplateOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodTemplateResponse { Ok(crate::v1_10::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_template( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodTemplateOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodTemplateResponse { Ok(crate::v1_10::api::core::v1::PodTemplate), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -750,6 +777,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_template( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -771,12 +799,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodTemplateResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_template_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -840,12 +871,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodTemplateForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/replication_controller.rs b/src/v1_10/api/core/v1/replication_controller.rs index 894c73320f..d1d027ec28 100644 --- a/src/v1_10/api/core/v1/replication_controller.rs +++ b/src/v1_10/api/core/v1/replication_controller.rs @@ -33,6 +33,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replication_controller( namespace: &str, body: &crate::v1_10::api::core::v1::ReplicationController, @@ -61,6 +62,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicationControllerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicationControllerResponse { Ok(crate::v1_10::api::core::v1::ReplicationController), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicationController { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replication_controller( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_collection_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicationControllerResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replication_controller( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicationControllerResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replication_controller( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicationControllerResponse { Ok(crate::v1_10::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replication_controller_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicationControllerForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerResponse { Ok(crate::v1_10::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerStatusResponse { Ok(crate::v1_10::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerResponse { Ok(crate::v1_10::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerStatusResponse { Ok(crate::v1_10::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerResponse { Ok(crate::v1_10::api::core::v1::ReplicationController), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerStatusResponse { Ok(crate::v1_10::api::core::v1::ReplicationController), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicationControllerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replication_controller( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicationControllerResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replication_controller_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicationControllerForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/resource_quota.rs b/src/v1_10/api/core/v1/resource_quota.rs index bf609dbce0..93bcf6c5e4 100644 --- a/src/v1_10/api/core/v1/resource_quota.rs +++ b/src/v1_10/api/core/v1/resource_quota.rs @@ -33,6 +33,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_resource_quota( namespace: &str, body: &crate::v1_10::api::core::v1::ResourceQuota, @@ -61,6 +62,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedResourceQuotaOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedResourceQuotaResponse { Ok(crate::v1_10::api::core::v1::ResourceQuota), @@ -76,6 +79,7 @@ pub enum CreateNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ResourceQuota { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_resource_quota( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_collection_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedResourceQuotaResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_resource_quota( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedResourceQuotaResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_resource_quota( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedResourceQuotaResponse { Ok(crate::v1_10::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_resource_quota_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListResourceQuotaForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaResponse { Ok(crate::v1_10::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaStatusResponse { Ok(crate::v1_10::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaResponse { Ok(crate::v1_10::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaStatusResponse { Ok(crate::v1_10::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaResponse { Ok(crate::v1_10::api::core::v1::ResourceQuota), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaStatusResponse { Ok(crate::v1_10::api::core::v1::ResourceQuota), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedResourceQuotaStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_resource_quota( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedResourceQuotaResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_resource_quota_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchResourceQuotaForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/secret.rs b/src/v1_10/api/core/v1/secret.rs index b6355e072b..b3cca20f5c 100644 --- a/src/v1_10/api/core/v1/secret.rs +++ b/src/v1_10/api/core/v1/secret.rs @@ -36,6 +36,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_secret( namespace: &str, body: &crate::v1_10::api::core::v1::Secret, @@ -64,6 +65,7 @@ impl Secret { } /// Optional parameters of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedSecretOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,6 +73,7 @@ pub struct CreateNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedSecretResponse { Ok(crate::v1_10::api::core::v1::Secret), @@ -79,6 +82,7 @@ pub enum CreateNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl Secret { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_secret( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -167,6 +172,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_collection_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedSecretResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -174,6 +180,7 @@ pub enum DeleteCollectionNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -236,6 +243,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_secret( name: &str, namespace: &str, @@ -257,6 +265,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedSecretResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -264,6 +273,7 @@ pub enum DeleteNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -324,6 +334,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_secret( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -345,12 +356,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedSecretResponse { Ok(crate::v1_10::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -394,6 +407,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_secret_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -412,12 +426,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListSecretForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_secret( name: &str, namespace: &str, @@ -498,12 +515,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::patch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedSecretResponse { Ok(crate::v1_10::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +572,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_secret( name: &str, namespace: &str, @@ -589,6 +609,7 @@ impl Secret { } /// Optional parameters of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedSecretOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -600,12 +621,14 @@ pub struct ReadNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedSecretResponse { Ok(crate::v1_10::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +680,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_secret( name: &str, namespace: &str, @@ -687,6 +711,7 @@ impl Secret { } /// Optional parameters of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedSecretOptional<'a> { /// If 'true', then the output is pretty printed. @@ -694,6 +719,7 @@ pub struct ReplaceNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedSecretResponse { Ok(crate::v1_10::api::core::v1::Secret), @@ -701,6 +727,7 @@ pub enum ReplaceNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -756,6 +783,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_secret( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -777,12 +805,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedSecretResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -828,6 +858,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_secret_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -846,12 +877,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchSecretForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/service.rs b/src/v1_10/api/core/v1/service.rs index 696e6b4908..c82bc3d527 100644 --- a/src/v1_10/api/core/v1/service.rs +++ b/src/v1_10/api/core/v1/service.rs @@ -33,6 +33,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -86,6 +88,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -137,6 +141,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy( name: &str, namespace: &str, @@ -162,6 +167,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -190,6 +196,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -217,6 +224,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -241,6 +249,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy( name: &str, namespace: &str, @@ -266,6 +275,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -294,6 +304,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -321,6 +332,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -345,6 +357,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy( name: &str, namespace: &str, @@ -370,6 +383,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -398,6 +412,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -425,6 +440,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -449,6 +465,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy( name: &str, namespace: &str, @@ -474,6 +491,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -502,6 +520,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -529,6 +548,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -553,6 +573,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service( namespace: &str, body: &crate::v1_10::api::core::v1::Service, @@ -581,6 +602,7 @@ impl Service { } /// Optional parameters of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -588,6 +610,7 @@ pub struct CreateNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceResponse { Ok(crate::v1_10::api::core::v1::Service), @@ -596,6 +619,7 @@ pub enum CreateNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service( name: &str, namespace: &str, @@ -682,6 +707,7 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -689,6 +715,7 @@ pub enum DeleteNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -770,12 +798,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceResponse { Ok(crate::v1_10::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -819,6 +849,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -837,12 +868,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -894,6 +927,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service( name: &str, namespace: &str, @@ -923,12 +957,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceResponse { Ok(crate::v1_10::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -980,6 +1016,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_status( name: &str, namespace: &str, @@ -1009,12 +1046,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceStatusResponse { Ok(crate::v1_10::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1064,6 +1103,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service( name: &str, namespace: &str, @@ -1100,6 +1140,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1111,12 +1152,14 @@ pub struct ReadNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceResponse { Ok(crate::v1_10::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1166,6 +1209,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_status( name: &str, namespace: &str, @@ -1194,6 +1238,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1201,12 +1246,14 @@ pub struct ReadNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceStatusResponse { Ok(crate::v1_10::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1258,6 +1305,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service( name: &str, namespace: &str, @@ -1288,6 +1336,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1295,6 +1344,7 @@ pub struct ReplaceNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceResponse { Ok(crate::v1_10::api::core::v1::Service), @@ -1302,6 +1352,7 @@ pub enum ReplaceNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1361,6 +1412,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_status( name: &str, namespace: &str, @@ -1391,6 +1443,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1398,6 +1451,7 @@ pub struct ReplaceNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceStatusResponse { Ok(crate::v1_10::api::core::v1::Service), @@ -1405,6 +1459,7 @@ pub enum ReplaceNamespacedServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1460,6 +1515,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1481,12 +1537,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1532,6 +1590,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1550,12 +1609,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/core/v1/service_account.rs b/src/v1_10/api/core/v1/service_account.rs index 3eff523c32..3f034ed9fa 100644 --- a/src/v1_10/api/core/v1/service_account.rs +++ b/src/v1_10/api/core/v1/service_account.rs @@ -36,6 +36,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service_account( namespace: &str, body: &crate::v1_10::api::core::v1::ServiceAccount, @@ -64,6 +65,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceAccountOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,6 +73,7 @@ pub struct CreateNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceAccountResponse { Ok(crate::v1_10::api::core::v1::ServiceAccount), @@ -79,6 +82,7 @@ pub enum CreateNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl ServiceAccount { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_service_account( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -167,6 +172,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_collection_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedServiceAccountResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -174,6 +180,7 @@ pub enum DeleteCollectionNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -236,6 +243,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service_account( name: &str, namespace: &str, @@ -257,6 +265,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceAccountResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -264,6 +273,7 @@ pub enum DeleteNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -324,6 +334,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service_account( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -345,12 +356,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceAccountResponse { Ok(crate::v1_10::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -394,6 +407,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_account_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -412,12 +426,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceAccountForAllNamespacesResponse { Ok(crate::v1_10::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_account( name: &str, namespace: &str, @@ -498,12 +515,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::patch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceAccountResponse { Ok(crate::v1_10::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +572,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_account( name: &str, namespace: &str, @@ -589,6 +609,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceAccountOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -600,12 +621,14 @@ pub struct ReadNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceAccountResponse { Ok(crate::v1_10::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +680,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_account( name: &str, namespace: &str, @@ -687,6 +711,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceAccountOptional<'a> { /// If 'true', then the output is pretty printed. @@ -694,6 +719,7 @@ pub struct ReplaceNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceAccountResponse { Ok(crate::v1_10::api::core::v1::ServiceAccount), @@ -701,6 +727,7 @@ pub enum ReplaceNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -756,6 +783,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service_account( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -777,12 +805,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceAccountResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -828,6 +858,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_account_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -846,12 +877,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceAccountForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/events/v1beta1/event.rs b/src/v1_10/api/events/v1beta1/event.rs index e4b0badaed..ce79b7e451 100644 --- a/src/v1_10/api/events/v1beta1/event.rs +++ b/src/v1_10/api/events/v1beta1/event.rs @@ -68,6 +68,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_10::api::events::v1beta1::Event, @@ -96,6 +97,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -103,6 +105,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_10::api::events::v1beta1::Event), @@ -111,6 +114,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -176,6 +180,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -199,6 +204,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -206,6 +212,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -268,6 +275,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -289,6 +297,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -296,6 +305,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -352,6 +362,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -370,12 +381,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_10::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -423,6 +436,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -444,12 +458,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_10::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -501,6 +517,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -530,12 +547,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_10::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -585,6 +604,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -621,6 +641,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -632,12 +653,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_10::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -689,6 +712,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -719,6 +743,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -726,6 +751,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_10::api::events::v1beta1::Event), @@ -733,6 +759,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -784,6 +811,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -802,12 +830,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -857,6 +887,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -878,12 +909,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/events/v1beta1/mod.rs b/src/v1_10/api/events/v1beta1/mod.rs index 34d0b5bf3a..0029a47de6 100644 --- a/src/v1_10/api/events/v1beta1/mod.rs +++ b/src/v1_10/api/events/v1beta1/mod.rs @@ -1,25 +1,19 @@ mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; diff --git a/src/v1_10/api/extensions/v1beta1/daemon_set.rs b/src/v1_10/api/extensions/v1beta1/daemon_set.rs index 75c3879f2b..ff9999cfdf 100644 --- a/src/v1_10/api/extensions/v1beta1/daemon_set.rs +++ b/src/v1_10/api/extensions/v1beta1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_10::api::extensions::v1beta1::DaemonSet, @@ -61,6 +62,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_10::api::extensions::v1beta1::DaemonSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_10::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_10::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_10::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_10::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_10::api::extensions::v1beta1::DaemonSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::DaemonSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/extensions/v1beta1/deployment.rs b/src/v1_10/api/extensions/v1beta1/deployment.rs index d9d1430cdd..c796dbf2d5 100644 --- a/src/v1_10/api/extensions/v1beta1/deployment.rs +++ b/src/v1_10/api/extensions/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_10::api::extensions::v1beta1::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_10::api::extensions::v1beta1::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_10::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_10::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_10::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_10::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_10::api::extensions::v1beta1::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/extensions/v1beta1/deployment_rollback.rs b/src/v1_10/api/extensions/v1beta1/deployment_rollback.rs index 57d96c4bfe..3093587ddc 100644 --- a/src/v1_10/api/extensions/v1beta1/deployment_rollback.rs +++ b/src/v1_10/api/extensions/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -67,6 +68,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// If 'true', then the output is pretty printed. @@ -74,6 +76,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_10::api::extensions::v1beta1::DeploymentRollback), @@ -82,6 +85,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/extensions/v1beta1/ingress.rs b/src/v1_10/api/extensions/v1beta1/ingress.rs index 933c0c0e03..146088ea06 100644 --- a/src/v1_10/api/extensions/v1beta1/ingress.rs +++ b/src/v1_10/api/extensions/v1beta1/ingress.rs @@ -33,6 +33,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_ingress( namespace: &str, body: &crate::v1_10::api::extensions::v1beta1::Ingress, @@ -61,6 +62,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedIngressOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedIngressResponse { Ok(crate::v1_10::api::extensions::v1beta1::Ingress), @@ -76,6 +79,7 @@ pub enum CreateNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Ingress { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_ingress( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_collection_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedIngressResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_ingress( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedIngressResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_ingress_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListIngressForAllNamespacesResponse { Ok(crate::v1_10::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_ingress( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedIngressResponse { Ok(crate::v1_10::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressResponse { Ok(crate::v1_10::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressResponse { Ok(crate::v1_10::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressResponse { Ok(crate::v1_10::api::extensions::v1beta1::Ingress), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::Ingress), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedIngressStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_ingress_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchIngressForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_ingress( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedIngressResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/extensions/v1beta1/mod.rs b/src/v1_10/api/extensions/v1beta1/mod.rs index 2ed08add27..d6fdd8c7fa 100644 --- a/src/v1_10/api/extensions/v1beta1/mod.rs +++ b/src/v1_10/api/extensions/v1beta1/mod.rs @@ -1,340 +1,236 @@ mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod http_ingress_path; -pub use self::http_ingress_path::{ - HTTPIngressPath, -}; +pub use self::http_ingress_path::HTTPIngressPath; mod http_ingress_rule_value; -pub use self::http_ingress_rule_value::{ - HTTPIngressRuleValue, -}; +pub use self::http_ingress_rule_value::HTTPIngressRuleValue; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod ingress; -pub use self::ingress::{ - Ingress, - CreateNamespacedIngressOptional, CreateNamespacedIngressResponse, - DeleteCollectionNamespacedIngressResponse, - DeleteNamespacedIngressResponse, - ListIngressForAllNamespacesResponse, - ListNamespacedIngressResponse, - PatchNamespacedIngressResponse, - PatchNamespacedIngressStatusResponse, - ReadNamespacedIngressOptional, ReadNamespacedIngressResponse, - ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse, - ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse, - ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse, - WatchIngressForAllNamespacesResponse, - WatchNamespacedIngressResponse, -}; +pub use self::ingress::Ingress; +#[cfg(feature = "api")] pub use self::ingress::{CreateNamespacedIngressOptional, CreateNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::DeleteCollectionNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::DeleteNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::ListIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::ListNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressStatusResponse; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressOptional, ReadNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::WatchIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::WatchNamespacedIngressResponse; mod ingress_backend; -pub use self::ingress_backend::{ - IngressBackend, -}; +pub use self::ingress_backend::IngressBackend; mod ingress_list; -pub use self::ingress_list::{ - IngressList, -}; +pub use self::ingress_list::IngressList; mod ingress_rule; -pub use self::ingress_rule::{ - IngressRule, -}; +pub use self::ingress_rule::IngressRule; mod ingress_spec; -pub use self::ingress_spec::{ - IngressSpec, -}; +pub use self::ingress_spec::IngressSpec; mod ingress_status; -pub use self::ingress_status::{ - IngressStatus, -}; +pub use self::ingress_status::IngressStatus; mod ingress_tls; -pub use self::ingress_tls::{ - IngressTLS, -}; +pub use self::ingress_tls::IngressTLS; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedReplicationControllerDummyScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerDummyScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_10/api/extensions/v1beta1/network_policy.rs b/src/v1_10/api/extensions/v1beta1/network_policy.rs index ce68fd74c7..38f81684e6 100644 --- a/src/v1_10/api/extensions/v1beta1/network_policy.rs +++ b/src/v1_10/api/extensions/v1beta1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_10::api::extensions::v1beta1::NetworkPolicy, @@ -58,6 +59,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_10::api::extensions::v1beta1::NetworkPolicy), @@ -73,6 +76,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -339,12 +350,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_10::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_10::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_10::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_10::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_10::api::extensions::v1beta1::NetworkPolicy), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -750,6 +777,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -771,12 +799,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -840,12 +871,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/extensions/v1beta1/pod_security_policy.rs b/src/v1_10/api/extensions/v1beta1/pod_security_policy.rs index b9609d5373..6a90d5fb96 100644 --- a/src/v1_10/api/extensions/v1beta1/pod_security_policy.rs +++ b/src/v1_10/api/extensions/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_10::api::extensions::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -51,6 +52,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_10::api::extensions::v1beta1::PodSecurityPolicy), @@ -66,6 +69,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -147,6 +152,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_10::api::extensions::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_10::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -477,6 +494,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_10::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_10::api::extensions::v1beta1::PodSecurityPolicy, @@ -569,6 +590,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_10::api::extensions::v1beta1::PodSecurityPolicy), @@ -583,6 +606,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/extensions/v1beta1/replica_set.rs b/src/v1_10/api/extensions/v1beta1/replica_set.rs index badcf58979..7b29095087 100644 --- a/src/v1_10/api/extensions/v1beta1/replica_set.rs +++ b/src/v1_10/api/extensions/v1beta1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_10::api::extensions::v1beta1::ReplicaSet, @@ -61,6 +62,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_10::api::extensions::v1beta1::ReplicaSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_10::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_10::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_10::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_10::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_10::api::extensions::v1beta1::ReplicaSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_10::api::extensions::v1beta1::ReplicaSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/extensions/v1beta1/scale.rs b/src/v1_10/api/extensions/v1beta1/scale.rs index 8dbba99d0c..b5561762ed 100644 --- a/src/v1_10/api/extensions/v1beta1/scale.rs +++ b/src/v1_10/api/extensions/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_10::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_10::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_10::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_10::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -595,6 +617,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -602,6 +625,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_10::api::extensions::v1beta1::Scale), @@ -609,6 +633,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +693,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -698,6 +724,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -705,6 +732,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_10::api::extensions::v1beta1::Scale), @@ -712,6 +740,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +800,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -801,6 +831,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -808,6 +839,7 @@ pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_10::api::extensions::v1beta1::Scale), @@ -815,6 +847,7 @@ pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/networking/v1/mod.rs b/src/v1_10/api/networking/v1/mod.rs index fcd95f99a8..23233ec53d 100644 --- a/src/v1_10/api/networking/v1/mod.rs +++ b/src/v1_10/api/networking/v1/mod.rs @@ -1,50 +1,34 @@ mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; diff --git a/src/v1_10/api/networking/v1/network_policy.rs b/src/v1_10/api/networking/v1/network_policy.rs index a4c846f36f..74b1f9416a 100644 --- a/src/v1_10/api/networking/v1/network_policy.rs +++ b/src/v1_10/api/networking/v1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_10::api::networking::v1::NetworkPolicy, @@ -58,6 +59,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_10::api::networking::v1::NetworkPolicy), @@ -73,6 +76,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -339,12 +350,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_10::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_10::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_10::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_10::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_10::api::networking::v1::NetworkPolicy), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -750,6 +777,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -771,12 +799,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -840,12 +871,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/policy/v1beta1/eviction.rs b/src/v1_10/api/policy/v1beta1/eviction.rs index 40e3f4bf70..b030b76d4c 100644 --- a/src/v1_10/api/policy/v1beta1/eviction.rs +++ b/src/v1_10/api/policy/v1beta1/eviction.rs @@ -34,6 +34,7 @@ impl Eviction { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_eviction( name: &str, namespace: &str, @@ -64,6 +65,7 @@ impl Eviction { } /// Optional parameters of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodEvictionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,6 +73,7 @@ pub struct CreateNamespacedPodEvictionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodEvictionResponse { Ok(crate::v1_10::api::policy::v1beta1::Eviction), @@ -79,6 +82,7 @@ pub enum CreateNamespacedPodEvictionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodEvictionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/policy/v1beta1/mod.rs b/src/v1_10/api/policy/v1beta1/mod.rs index 4d8a99d607..336d3ebb5d 100644 --- a/src/v1_10/api/policy/v1beta1/mod.rs +++ b/src/v1_10/api/policy/v1beta1/mod.rs @@ -1,102 +1,70 @@ mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod eviction; -pub use self::eviction::{ - Eviction, - CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse, -}; +pub use self::eviction::Eviction; +#[cfg(feature = "api")] pub use self::eviction::{CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse}; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod pod_disruption_budget; -pub use self::pod_disruption_budget::{ - PodDisruptionBudget, - CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse, - DeleteCollectionNamespacedPodDisruptionBudgetResponse, - DeleteNamespacedPodDisruptionBudgetResponse, - ListNamespacedPodDisruptionBudgetResponse, - ListPodDisruptionBudgetForAllNamespacesResponse, - PatchNamespacedPodDisruptionBudgetResponse, - PatchNamespacedPodDisruptionBudgetStatusResponse, - ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse, - ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse, - ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse, - ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse, - WatchNamespacedPodDisruptionBudgetResponse, - WatchPodDisruptionBudgetForAllNamespacesResponse, -}; +pub use self::pod_disruption_budget::PodDisruptionBudget; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteCollectionNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListPodDisruptionBudgetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetStatusResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchPodDisruptionBudgetForAllNamespacesResponse; mod pod_disruption_budget_list; -pub use self::pod_disruption_budget_list::{ - PodDisruptionBudgetList, -}; +pub use self::pod_disruption_budget_list::PodDisruptionBudgetList; mod pod_disruption_budget_spec; -pub use self::pod_disruption_budget_spec::{ - PodDisruptionBudgetSpec, -}; +pub use self::pod_disruption_budget_spec::PodDisruptionBudgetSpec; mod pod_disruption_budget_status; -pub use self::pod_disruption_budget_status::{ - PodDisruptionBudgetStatus, -}; +pub use self::pod_disruption_budget_status::PodDisruptionBudgetStatus; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_10/api/policy/v1beta1/pod_disruption_budget.rs b/src/v1_10/api/policy/v1beta1/pod_disruption_budget.rs index 81e3c885d7..6a7c25e398 100644 --- a/src/v1_10/api/policy/v1beta1/pod_disruption_budget.rs +++ b/src/v1_10/api/policy/v1beta1/pod_disruption_budget.rs @@ -32,6 +32,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_disruption_budget( namespace: &str, body: &crate::v1_10::api::policy::v1beta1::PodDisruptionBudget, @@ -60,6 +61,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,6 +69,7 @@ pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_10::api::policy::v1beta1::PodDisruptionBudget), @@ -75,6 +78,7 @@ pub enum CreateNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -140,6 +144,7 @@ impl PodDisruptionBudget { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_disruption_budget( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -163,6 +168,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_collection_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -170,6 +176,7 @@ pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -232,6 +239,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -253,6 +261,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -260,6 +269,7 @@ pub enum DeleteNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -341,12 +352,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_10::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -390,6 +403,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_disruption_budget_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -408,12 +422,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_10::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -465,6 +481,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -494,12 +511,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_10::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -551,6 +570,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -580,12 +600,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_10::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -635,6 +657,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -671,6 +694,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -682,12 +706,14 @@ pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_10::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -737,6 +763,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -765,6 +792,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -772,12 +800,14 @@ pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_10::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -829,6 +859,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -859,6 +890,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -866,6 +898,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_10::api::policy::v1beta1::PodDisruptionBudget), @@ -873,6 +906,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -932,6 +966,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -962,6 +997,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -969,6 +1005,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_10::api::policy::v1beta1::PodDisruptionBudget), @@ -976,6 +1013,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1031,6 +1069,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -1052,12 +1091,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1103,6 +1144,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_disruption_budget_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1121,12 +1163,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/policy/v1beta1/pod_security_policy.rs b/src/v1_10/api/policy/v1beta1/pod_security_policy.rs index e4f394770b..1173341988 100644 --- a/src/v1_10/api/policy/v1beta1/pod_security_policy.rs +++ b/src/v1_10/api/policy/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_10::api::policy::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -51,6 +52,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_10::api::policy::v1beta1::PodSecurityPolicy), @@ -66,6 +69,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -147,6 +152,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_10::api::policy::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_10::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -477,6 +494,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_10::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_10::api::policy::v1beta1::PodSecurityPolicy, @@ -569,6 +590,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_10::api::policy::v1beta1::PodSecurityPolicy), @@ -583,6 +606,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1/cluster_role.rs b/src/v1_10/api/rbac/v1/cluster_role.rs index d392e68228..ca1d121d5b 100644 --- a/src/v1_10/api/rbac/v1/cluster_role.rs +++ b/src/v1_10/api/rbac/v1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_10::api::rbac::v1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1::ClusterRole), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_10::api::rbac::v1::ClusterRole, @@ -560,6 +581,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1::ClusterRole), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1/cluster_role_binding.rs b/src/v1_10/api/rbac/v1/cluster_role_binding.rs index 0d11ab08fe..b01371f30a 100644 --- a/src/v1_10/api/rbac/v1/cluster_role_binding.rs +++ b/src/v1_10/api/rbac/v1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_10::api::rbac::v1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1::ClusterRoleBinding), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_10::api::rbac::v1::ClusterRoleBinding, @@ -560,6 +581,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1::ClusterRoleBinding), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1/mod.rs b/src/v1_10/api/rbac/v1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_10/api/rbac/v1/mod.rs +++ b/src/v1_10/api/rbac/v1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_10/api/rbac/v1/role.rs b/src/v1_10/api/rbac/v1/role.rs index f2370f2bf6..4c5e767013 100644 --- a/src/v1_10/api/rbac/v1/role.rs +++ b/src/v1_10/api/rbac/v1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_10::api::rbac::v1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1::Role), @@ -73,6 +76,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -339,12 +350,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_10::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -575,6 +595,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,12 +603,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +662,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -669,6 +693,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,6 +701,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1::Role), @@ -683,6 +709,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +765,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -759,12 +787,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -810,6 +840,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -828,12 +859,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1/role_binding.rs b/src/v1_10/api/rbac/v1/role_binding.rs index 14533fd978..46ae11002a 100644 --- a/src/v1_10/api/rbac/v1/role_binding.rs +++ b/src/v1_10/api/rbac/v1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_10::api::rbac::v1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1::RoleBinding), @@ -76,6 +79,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -342,12 +353,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_10::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -578,6 +598,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -585,12 +606,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -672,6 +696,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -679,6 +704,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1::RoleBinding), @@ -686,6 +712,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +768,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -762,12 +790,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -813,6 +843,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -831,12 +862,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1alpha1/cluster_role.rs b/src/v1_10/api/rbac/v1alpha1/cluster_role.rs index 54bace2272..b8e4444474 100644 --- a/src/v1_10/api/rbac/v1alpha1/cluster_role.rs +++ b/src/v1_10/api/rbac/v1alpha1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_10::api::rbac::v1alpha1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1alpha1::ClusterRole), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1alpha1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_10::api::rbac::v1alpha1::ClusterRole, @@ -560,6 +581,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1alpha1::ClusterRole), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1alpha1/cluster_role_binding.rs b/src/v1_10/api/rbac/v1alpha1/cluster_role_binding.rs index b18ad404b6..2f3adaaf8c 100644 --- a/src/v1_10/api/rbac/v1alpha1/cluster_role_binding.rs +++ b/src/v1_10/api/rbac/v1alpha1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_10::api::rbac::v1alpha1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1alpha1::ClusterRoleBinding), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1alpha1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_10::api::rbac::v1alpha1::ClusterRoleBinding, @@ -560,6 +581,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1alpha1::ClusterRoleBinding), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1alpha1/mod.rs b/src/v1_10/api/rbac/v1alpha1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_10/api/rbac/v1alpha1/mod.rs +++ b/src/v1_10/api/rbac/v1alpha1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_10/api/rbac/v1alpha1/role.rs b/src/v1_10/api/rbac/v1alpha1/role.rs index f191a8833c..8683ef6b30 100644 --- a/src/v1_10/api/rbac/v1alpha1/role.rs +++ b/src/v1_10/api/rbac/v1alpha1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_10::api::rbac::v1alpha1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1alpha1::Role), @@ -73,6 +76,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -339,12 +350,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_10::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -575,6 +595,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,12 +603,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +662,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -669,6 +693,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,6 +701,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1alpha1::Role), @@ -683,6 +709,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +765,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -759,12 +787,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -810,6 +840,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -828,12 +859,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1alpha1/role_binding.rs b/src/v1_10/api/rbac/v1alpha1/role_binding.rs index 9fc1799991..fb4e21ae1c 100644 --- a/src/v1_10/api/rbac/v1alpha1/role_binding.rs +++ b/src/v1_10/api/rbac/v1alpha1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_10::api::rbac::v1alpha1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1alpha1::RoleBinding), @@ -76,6 +79,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -342,12 +353,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_10::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -578,6 +598,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -585,12 +606,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -672,6 +696,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -679,6 +704,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1alpha1::RoleBinding), @@ -686,6 +712,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +768,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -762,12 +790,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -813,6 +843,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -831,12 +862,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1beta1/cluster_role.rs b/src/v1_10/api/rbac/v1beta1/cluster_role.rs index e9fa050703..fc39b25210 100644 --- a/src/v1_10/api/rbac/v1beta1/cluster_role.rs +++ b/src/v1_10/api/rbac/v1beta1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_10::api::rbac::v1beta1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1beta1::ClusterRole), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1beta1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_10::api::rbac::v1beta1::ClusterRole, @@ -560,6 +581,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_10::api::rbac::v1beta1::ClusterRole), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1beta1/cluster_role_binding.rs b/src/v1_10/api/rbac/v1beta1/cluster_role_binding.rs index 1607a753ab..706eddd140 100644 --- a/src/v1_10/api/rbac/v1beta1/cluster_role_binding.rs +++ b/src/v1_10/api/rbac/v1beta1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_10::api::rbac::v1beta1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1beta1::ClusterRoleBinding), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1beta1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_10::api::rbac::v1beta1::ClusterRoleBinding, @@ -560,6 +581,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1beta1::ClusterRoleBinding), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1beta1/mod.rs b/src/v1_10/api/rbac/v1beta1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_10/api/rbac/v1beta1/mod.rs +++ b/src/v1_10/api/rbac/v1beta1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_10/api/rbac/v1beta1/role.rs b/src/v1_10/api/rbac/v1beta1/role.rs index 1254c284fa..e515fe97a9 100644 --- a/src/v1_10/api/rbac/v1beta1/role.rs +++ b/src/v1_10/api/rbac/v1beta1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_10::api::rbac::v1beta1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1beta1::Role), @@ -73,6 +76,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -339,12 +350,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_10::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -575,6 +595,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,12 +603,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +662,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -669,6 +693,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,6 +701,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_10::api::rbac::v1beta1::Role), @@ -683,6 +709,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +765,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -759,12 +787,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -810,6 +840,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -828,12 +859,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/rbac/v1beta1/role_binding.rs b/src/v1_10/api/rbac/v1beta1/role_binding.rs index c2537426fe..4b5f6d29d5 100644 --- a/src/v1_10/api/rbac/v1beta1/role_binding.rs +++ b/src/v1_10/api/rbac/v1beta1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_10::api::rbac::v1beta1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1beta1::RoleBinding), @@ -76,6 +79,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -342,12 +353,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_10::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -578,6 +598,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -585,12 +606,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -672,6 +696,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -679,6 +704,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_10::api::rbac::v1beta1::RoleBinding), @@ -686,6 +712,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +768,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -762,12 +790,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -813,6 +843,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -831,12 +862,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/scheduling/v1alpha1/mod.rs b/src/v1_10/api/scheduling/v1alpha1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_10/api/scheduling/v1alpha1/mod.rs +++ b/src/v1_10/api/scheduling/v1alpha1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_10/api/scheduling/v1alpha1/priority_class.rs b/src/v1_10/api/scheduling/v1alpha1/priority_class.rs index 7b927745f9..d8bc4802de 100644 --- a/src/v1_10/api/scheduling/v1alpha1/priority_class.rs +++ b/src/v1_10/api/scheduling/v1alpha1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_10::api::scheduling::v1alpha1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -57,6 +58,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -64,6 +66,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_10::api::scheduling::v1alpha1::PriorityClass), @@ -72,6 +75,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -133,6 +137,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -153,6 +158,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -160,6 +166,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -218,6 +225,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -237,6 +245,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -244,6 +253,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -300,6 +310,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -318,12 +329,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_10::api::scheduling::v1alpha1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -371,6 +384,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -398,12 +412,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_10::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -449,6 +465,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -483,6 +500,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -494,12 +512,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_10::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +567,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_10::api::scheduling::v1alpha1::PriorityClass, @@ -575,6 +596,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,6 +604,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_10::api::scheduling::v1alpha1::PriorityClass), @@ -589,6 +612,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -640,6 +664,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -658,12 +683,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/settings/v1alpha1/mod.rs b/src/v1_10/api/settings/v1alpha1/mod.rs index f0ebd9df12..7816e600a8 100644 --- a/src/v1_10/api/settings/v1alpha1/mod.rs +++ b/src/v1_10/api/settings/v1alpha1/mod.rs @@ -1,25 +1,19 @@ mod pod_preset; -pub use self::pod_preset::{ - PodPreset, - CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse, - DeleteCollectionNamespacedPodPresetResponse, - DeleteNamespacedPodPresetResponse, - ListNamespacedPodPresetResponse, - ListPodPresetForAllNamespacesResponse, - PatchNamespacedPodPresetResponse, - ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse, - ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse, - WatchNamespacedPodPresetResponse, - WatchPodPresetForAllNamespacesResponse, -}; +pub use self::pod_preset::PodPreset; +#[cfg(feature = "api")] pub use self::pod_preset::{CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteCollectionNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListPodPresetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_preset::PatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::{ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::{ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::WatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::WatchPodPresetForAllNamespacesResponse; mod pod_preset_list; -pub use self::pod_preset_list::{ - PodPresetList, -}; +pub use self::pod_preset_list::PodPresetList; mod pod_preset_spec; -pub use self::pod_preset_spec::{ - PodPresetSpec, -}; +pub use self::pod_preset_spec::PodPresetSpec; diff --git a/src/v1_10/api/settings/v1alpha1/pod_preset.rs b/src/v1_10/api/settings/v1alpha1/pod_preset.rs index 8eee481799..f1330a7d1c 100644 --- a/src/v1_10/api/settings/v1alpha1/pod_preset.rs +++ b/src/v1_10/api/settings/v1alpha1/pod_preset.rs @@ -28,6 +28,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_preset( namespace: &str, body: &crate::v1_10::api::settings::v1alpha1::PodPreset, @@ -56,6 +57,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodPresetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -63,6 +65,7 @@ pub struct CreateNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodPresetResponse { Ok(crate::v1_10::api::settings::v1alpha1::PodPreset), @@ -71,6 +74,7 @@ pub enum CreateNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -136,6 +140,7 @@ impl PodPreset { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_preset( namespace: &str, delete_optional: crate::v1_10::DeleteOptional<'_>, @@ -159,6 +164,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_collection_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodPresetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -228,6 +235,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_preset( name: &str, namespace: &str, @@ -249,6 +257,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodPresetResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -316,6 +326,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_preset( namespace: &str, optional: crate::v1_10::ListOptional<'_>, @@ -337,12 +348,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodPresetResponse { Ok(crate::v1_10::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_preset_for_all_namespaces( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -404,12 +418,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodPresetForAllNamespacesResponse { Ok(crate::v1_10::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -461,6 +477,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_preset( name: &str, namespace: &str, @@ -490,12 +507,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::patch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodPresetResponse { Ok(crate::v1_10::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -545,6 +564,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_preset( name: &str, namespace: &str, @@ -581,6 +601,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodPresetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -592,12 +613,14 @@ pub struct ReadNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodPresetResponse { Ok(crate::v1_10::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -649,6 +672,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_preset( name: &str, namespace: &str, @@ -679,6 +703,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodPresetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -686,6 +711,7 @@ pub struct ReplaceNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodPresetResponse { Ok(crate::v1_10::api::settings::v1alpha1::PodPreset), @@ -693,6 +719,7 @@ pub enum ReplaceNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -748,6 +775,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_preset( namespace: &str, optional: crate::v1_10::WatchOptional<'_>, @@ -769,12 +797,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodPresetResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -820,6 +850,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_preset_for_all_namespaces( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -838,12 +869,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodPresetForAllNamespacesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/storage/v1/mod.rs b/src/v1_10/api/storage/v1/mod.rs index d20d9cc056..0d65688c2d 100644 --- a/src/v1_10/api/storage/v1/mod.rs +++ b/src/v1_10/api/storage/v1/mod.rs @@ -1,18 +1,14 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; diff --git a/src/v1_10/api/storage/v1/storage_class.rs b/src/v1_10/api/storage/v1/storage_class.rs index e5731d7768..86ee8c6e13 100644 --- a/src/v1_10/api/storage/v1/storage_class.rs +++ b/src/v1_10/api/storage/v1/storage_class.rs @@ -43,6 +43,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_10::api::storage::v1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -68,6 +69,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -75,6 +77,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_10::api::storage::v1::StorageClass), @@ -83,6 +86,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -164,6 +169,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -255,6 +264,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -311,6 +321,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -329,12 +340,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_10::api::storage::v1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -382,6 +395,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -409,12 +423,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_10::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -460,6 +476,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -494,6 +511,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -505,12 +523,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_10::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -558,6 +578,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_10::api::storage::v1::StorageClass, @@ -586,6 +607,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -593,6 +615,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_10::api::storage::v1::StorageClass), @@ -600,6 +623,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +675,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -669,12 +694,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/storage/v1alpha1/mod.rs b/src/v1_10/api/storage/v1alpha1/mod.rs index a5eefeed6c..4b5a7d41ec 100644 --- a/src/v1_10/api/storage/v1alpha1/mod.rs +++ b/src/v1_10/api/storage/v1alpha1/mod.rs @@ -1,38 +1,26 @@ mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_10/api/storage/v1alpha1/volume_attachment.rs b/src/v1_10/api/storage/v1alpha1/volume_attachment.rs index 575b4b7eed..1ecf0e30d4 100644 --- a/src/v1_10/api/storage/v1alpha1/volume_attachment.rs +++ b/src/v1_10/api/storage/v1alpha1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_10::api::storage::v1alpha1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -56,6 +57,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -63,6 +65,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_10::api::storage::v1alpha1::VolumeAttachment), @@ -71,6 +74,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -132,6 +136,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -152,6 +157,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -159,6 +165,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -217,6 +224,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -236,6 +244,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_10::api::storage::v1alpha1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -397,12 +411,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_10::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -482,6 +499,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -493,12 +511,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_10::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +566,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_10::api::storage::v1alpha1::VolumeAttachment, @@ -574,6 +595,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -581,6 +603,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_10::api::storage::v1alpha1::VolumeAttachment), @@ -588,6 +611,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +663,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -657,12 +682,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/storage/v1beta1/mod.rs b/src/v1_10/api/storage/v1beta1/mod.rs index 68d636f0cb..bcaee085a0 100644 --- a/src/v1_10/api/storage/v1beta1/mod.rs +++ b/src/v1_10/api/storage/v1beta1/mod.rs @@ -1,56 +1,40 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_10/api/storage/v1beta1/storage_class.rs b/src/v1_10/api/storage/v1beta1/storage_class.rs index 48b9a9ffc9..92fb7aa694 100644 --- a/src/v1_10/api/storage/v1beta1/storage_class.rs +++ b/src/v1_10/api/storage/v1beta1/storage_class.rs @@ -43,6 +43,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_10::api::storage::v1beta1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -68,6 +69,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -75,6 +77,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_10::api::storage::v1beta1::StorageClass), @@ -83,6 +86,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -164,6 +169,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -255,6 +264,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -311,6 +321,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -329,12 +340,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_10::api::storage::v1beta1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -382,6 +395,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -409,12 +423,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_10::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -460,6 +476,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -494,6 +511,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -505,12 +523,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_10::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -558,6 +578,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_10::api::storage::v1beta1::StorageClass, @@ -586,6 +607,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -593,6 +615,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_10::api::storage::v1beta1::StorageClass), @@ -600,6 +623,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +675,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -669,12 +694,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/api/storage/v1beta1/volume_attachment.rs b/src/v1_10/api/storage/v1beta1/volume_attachment.rs index 9e7a4d1ef9..a59d536669 100644 --- a/src/v1_10/api/storage/v1beta1/volume_attachment.rs +++ b/src/v1_10/api/storage/v1beta1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_10::api::storage::v1beta1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -56,6 +57,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -63,6 +65,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_10::api::storage::v1beta1::VolumeAttachment), @@ -71,6 +74,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -132,6 +136,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -152,6 +157,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -159,6 +165,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -217,6 +224,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -236,6 +244,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_10::api::storage::v1beta1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -397,12 +411,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_10::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -482,6 +499,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -493,12 +511,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_10::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +566,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_10::api::storage::v1beta1::VolumeAttachment, @@ -574,6 +595,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -581,6 +603,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_10::api::storage::v1beta1::VolumeAttachment), @@ -588,6 +611,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +663,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -657,12 +682,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs b/src/v1_10/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs index a406867b9d..a942109817 100644 --- a/src/v1_10/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs +++ b/src/v1_10/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs @@ -28,6 +28,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_custom_resource_definition( body: &crate::v1_10::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, optional: CreateCustomResourceDefinitionOptional<'_>, @@ -53,6 +54,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCustomResourceDefinitionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCustomResourceDefinitionResponse { Ok(crate::v1_10::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -68,6 +71,7 @@ pub enum CreateCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -129,6 +133,7 @@ impl CustomResourceDefinition { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_custom_resource_definition( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -149,6 +154,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_collection_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCustomResourceDefinitionResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteCollectionCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_custom_resource_definition( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -233,6 +241,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCustomResourceDefinitionResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_custom_resource_definition( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::list_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCustomResourceDefinitionResponse { Ok(crate::v1_10::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinitionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -394,12 +408,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionResponse { Ok(crate::v1_10::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition( name: &str, optional: ReadCustomResourceDefinitionOptional<'_>, @@ -479,6 +496,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -490,12 +508,14 @@ pub struct ReadCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionResponse { Ok(crate::v1_10::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -543,6 +563,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition( name: &str, body: &crate::v1_10::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -571,6 +592,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -578,6 +600,7 @@ pub struct ReplaceCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionResponse { Ok(crate::v1_10::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -585,6 +608,7 @@ pub enum ReplaceCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -640,6 +664,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition_status( name: &str, body: &crate::v1_10::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -668,6 +693,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,6 +701,7 @@ pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionStatusResponse { Ok(crate::v1_10::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -682,6 +709,7 @@ pub enum ReplaceCustomResourceDefinitionStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -733,6 +761,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_custom_resource_definition( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -751,12 +780,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::watch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCustomResourceDefinitionResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs b/src/v1_10/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs index 8b104aacb0..c9e23f65de 100644 --- a/src/v1_10/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs +++ b/src/v1_10/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs @@ -1,89 +1,57 @@ mod custom_resource_definition; -pub use self::custom_resource_definition::{ - CustomResourceDefinition, - CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse, - DeleteCollectionCustomResourceDefinitionResponse, - DeleteCustomResourceDefinitionResponse, - ListCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionResponse, - ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse, - ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse, - ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse, - WatchCustomResourceDefinitionResponse, -}; +pub use self::custom_resource_definition::CustomResourceDefinition; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCollectionCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::ListCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::WatchCustomResourceDefinitionResponse; mod custom_resource_definition_condition; -pub use self::custom_resource_definition_condition::{ - CustomResourceDefinitionCondition, -}; +pub use self::custom_resource_definition_condition::CustomResourceDefinitionCondition; mod custom_resource_definition_list; -pub use self::custom_resource_definition_list::{ - CustomResourceDefinitionList, -}; +pub use self::custom_resource_definition_list::CustomResourceDefinitionList; mod custom_resource_definition_names; -pub use self::custom_resource_definition_names::{ - CustomResourceDefinitionNames, -}; +pub use self::custom_resource_definition_names::CustomResourceDefinitionNames; mod custom_resource_definition_spec; -pub use self::custom_resource_definition_spec::{ - CustomResourceDefinitionSpec, -}; +pub use self::custom_resource_definition_spec::CustomResourceDefinitionSpec; mod custom_resource_definition_status; -pub use self::custom_resource_definition_status::{ - CustomResourceDefinitionStatus, -}; +pub use self::custom_resource_definition_status::CustomResourceDefinitionStatus; mod custom_resource_subresource_scale; -pub use self::custom_resource_subresource_scale::{ - CustomResourceSubresourceScale, -}; +pub use self::custom_resource_subresource_scale::CustomResourceSubresourceScale; mod custom_resource_subresource_status; -pub use self::custom_resource_subresource_status::{ - CustomResourceSubresourceStatus, -}; +pub use self::custom_resource_subresource_status::CustomResourceSubresourceStatus; mod custom_resource_subresources; -pub use self::custom_resource_subresources::{ - CustomResourceSubresources, -}; +pub use self::custom_resource_subresources::CustomResourceSubresources; mod custom_resource_validation; -pub use self::custom_resource_validation::{ - CustomResourceValidation, -}; +pub use self::custom_resource_validation::CustomResourceValidation; mod external_documentation; -pub use self::external_documentation::{ - ExternalDocumentation, -}; +pub use self::external_documentation::ExternalDocumentation; mod json; -pub use self::json::{ - JSON, -}; +pub use self::json::JSON; mod json_schema_props; -pub use self::json_schema_props::{ - JSONSchemaProps, -}; +pub use self::json_schema_props::JSONSchemaProps; mod json_schema_props_or_array; -pub use self::json_schema_props_or_array::{ - JSONSchemaPropsOrArray, -}; +pub use self::json_schema_props_or_array::JSONSchemaPropsOrArray; mod json_schema_props_or_bool; -pub use self::json_schema_props_or_bool::{ - JSONSchemaPropsOrBool, -}; +pub use self::json_schema_props_or_bool::JSONSchemaPropsOrBool; mod json_schema_props_or_string_array; -pub use self::json_schema_props_or_string_array::{ - JSONSchemaPropsOrStringArray, -}; +pub use self::json_schema_props_or_string_array::JSONSchemaPropsOrStringArray; diff --git a/src/v1_10/apimachinery/pkg/api/resource/mod.rs b/src/v1_10/apimachinery/pkg/api/resource/mod.rs index 352925b923..629eeca5bc 100644 --- a/src/v1_10/apimachinery/pkg/api/resource/mod.rs +++ b/src/v1_10/apimachinery/pkg/api/resource/mod.rs @@ -1,5 +1,3 @@ mod quantity; -pub use self::quantity::{ - Quantity, -}; +pub use self::quantity::Quantity; diff --git a/src/v1_10/apimachinery/pkg/apis/meta/v1/mod.rs b/src/v1_10/apimachinery/pkg/apis/meta/v1/mod.rs index 9654f201d6..2a0195df45 100644 --- a/src/v1_10/apimachinery/pkg/apis/meta/v1/mod.rs +++ b/src/v1_10/apimachinery/pkg/apis/meta/v1/mod.rs @@ -1,115 +1,69 @@ mod api_group; -pub use self::api_group::{ - APIGroup, -}; +pub use self::api_group::APIGroup; mod api_group_list; -pub use self::api_group_list::{ - APIGroupList, -}; +pub use self::api_group_list::APIGroupList; mod api_resource; -pub use self::api_resource::{ - APIResource, -}; +pub use self::api_resource::APIResource; mod api_resource_list; -pub use self::api_resource_list::{ - APIResourceList, -}; +pub use self::api_resource_list::APIResourceList; mod api_versions; -pub use self::api_versions::{ - APIVersions, -}; +pub use self::api_versions::APIVersions; mod delete_options; -pub use self::delete_options::{ - DeleteOptions, -}; +pub use self::delete_options::DeleteOptions; mod group_version_for_discovery; -pub use self::group_version_for_discovery::{ - GroupVersionForDiscovery, -}; +pub use self::group_version_for_discovery::GroupVersionForDiscovery; mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializers; -pub use self::initializers::{ - Initializers, -}; +pub use self::initializers::Initializers; mod label_selector; -pub use self::label_selector::{ - LabelSelector, -}; +pub use self::label_selector::LabelSelector; mod label_selector_requirement; -pub use self::label_selector_requirement::{ - LabelSelectorRequirement, -}; +pub use self::label_selector_requirement::LabelSelectorRequirement; mod list_meta; -pub use self::list_meta::{ - ListMeta, -}; +pub use self::list_meta::ListMeta; mod micro_time; -pub use self::micro_time::{ - MicroTime, -}; +pub use self::micro_time::MicroTime; mod object_meta; -pub use self::object_meta::{ - ObjectMeta, -}; +pub use self::object_meta::ObjectMeta; mod owner_reference; -pub use self::owner_reference::{ - OwnerReference, -}; +pub use self::owner_reference::OwnerReference; mod patch; -pub use self::patch::{ - Patch, -}; +pub use self::patch::Patch; mod preconditions; -pub use self::preconditions::{ - Preconditions, -}; +pub use self::preconditions::Preconditions; mod server_address_by_client_cidr; -pub use self::server_address_by_client_cidr::{ - ServerAddressByClientCIDR, -}; +pub use self::server_address_by_client_cidr::ServerAddressByClientCIDR; mod status; -pub use self::status::{ - Status, -}; +pub use self::status::Status; mod status_cause; -pub use self::status_cause::{ - StatusCause, -}; +pub use self::status_cause::StatusCause; mod status_details; -pub use self::status_details::{ - StatusDetails, -}; +pub use self::status_details::StatusDetails; mod time; -pub use self::time::{ - Time, -}; +pub use self::time::Time; mod watch_event; -pub use self::watch_event::{ - WatchEvent, -}; +pub use self::watch_event::WatchEvent; diff --git a/src/v1_10/apimachinery/pkg/runtime/mod.rs b/src/v1_10/apimachinery/pkg/runtime/mod.rs index 8614e1a158..eb2b8c0503 100644 --- a/src/v1_10/apimachinery/pkg/runtime/mod.rs +++ b/src/v1_10/apimachinery/pkg/runtime/mod.rs @@ -1,5 +1,3 @@ mod raw_extension; -pub use self::raw_extension::{ - RawExtension, -}; +pub use self::raw_extension::RawExtension; diff --git a/src/v1_10/apimachinery/pkg/util/intstr/mod.rs b/src/v1_10/apimachinery/pkg/util/intstr/mod.rs index 0d14f602e5..d3f7196121 100644 --- a/src/v1_10/apimachinery/pkg/util/intstr/mod.rs +++ b/src/v1_10/apimachinery/pkg/util/intstr/mod.rs @@ -1,5 +1,3 @@ mod int_or_string; -pub use self::int_or_string::{ - IntOrString, -}; +pub use self::int_or_string::IntOrString; diff --git a/src/v1_10/apimachinery/pkg/version/mod.rs b/src/v1_10/apimachinery/pkg/version/mod.rs index 540fa68d40..f125e577d1 100644 --- a/src/v1_10/apimachinery/pkg/version/mod.rs +++ b/src/v1_10/apimachinery/pkg/version/mod.rs @@ -1,5 +1,3 @@ mod info; -pub use self::info::{ - Info, -}; +pub use self::info::Info; diff --git a/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs b/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs index 7b0bfceaf5..75470857cc 100644 --- a/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs +++ b/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -53,6 +54,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -68,6 +71,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -129,6 +133,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -148,6 +153,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -155,6 +161,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -213,6 +220,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -233,6 +241,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -394,12 +408,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -479,6 +496,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -490,12 +508,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -543,6 +563,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -571,6 +592,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -578,6 +600,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -585,6 +608,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -640,6 +664,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -668,6 +693,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,6 +701,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -682,6 +709,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -733,6 +761,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -751,12 +780,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs b/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs index 9eb26431b5..33741c4264 100644 --- a/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs +++ b/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs @@ -1,39 +1,27 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs b/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs index fc43625606..630992335c 100644 --- a/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs +++ b/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -53,6 +54,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -68,6 +71,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -129,6 +133,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_10::DeleteOptional<'_>, @@ -148,6 +153,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -155,6 +161,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -213,6 +220,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_10::DeleteOptional<'_>, list_optional: crate::v1_10::ListOptional<'_>, @@ -233,6 +241,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_10::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_10::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_10::apimachinery::pkg::apis::meta::v1::Patch, @@ -394,12 +408,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -479,6 +496,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -490,12 +508,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -543,6 +563,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -571,6 +592,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -578,6 +600,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -585,6 +608,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -640,6 +664,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -668,6 +693,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,6 +701,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_10::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -682,6 +709,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -733,6 +761,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_10::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -751,12 +780,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs b/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs index 9eb26431b5..33741c4264 100644 --- a/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs +++ b/src/v1_10/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs @@ -1,39 +1,27 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_10/mod.rs b/src/v1_10/mod.rs index 3e0c895b34..4a959b3ea4 100644 --- a/src/v1_10/mod.rs +++ b/src/v1_10/mod.rs @@ -1,23 +1,15 @@ mod delete_optional; -pub use self::delete_optional::{ - DeleteOptional, -}; +pub use self::delete_optional::DeleteOptional; mod list_optional; -pub use self::list_optional::{ - ListOptional, -}; +pub use self::list_optional::ListOptional; mod patch_optional; -pub use self::patch_optional::{ - PatchOptional, -}; +pub use self::patch_optional::PatchOptional; mod watch_optional; -pub use self::watch_optional::{ - WatchOptional, -}; +pub use self::watch_optional::WatchOptional; pub mod api; @@ -32,6 +24,7 @@ pub mod kube_aggregator; /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAPIVersionsResponse`]`>` constructor, or [`GetAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/".to_owned(); @@ -45,12 +38,14 @@ pub fn get_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAPIVersionsResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroupList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -85,6 +80,7 @@ impl crate::Response for GetAPIVersionsResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationAPIGroupResponse`]`>` constructor, or [`GetAdmissionregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/".to_owned(); @@ -98,12 +94,14 @@ pub fn get_admissionregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +136,7 @@ impl crate::Response for GetAdmissionregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1alpha1/".to_owned(); @@ -151,12 +150,14 @@ pub fn get_admissionregistration_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1alpha1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -191,6 +192,7 @@ impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1beta1/".to_owned(); @@ -204,12 +206,14 @@ pub fn get_admissionregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +248,7 @@ impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsAPIGroupResponse`]`>` constructor, or [`GetApiextensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/".to_owned(); @@ -257,12 +262,14 @@ pub fn get_apiextensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +304,7 @@ impl crate::Response for GetApiextensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiextensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/v1beta1/".to_owned(); @@ -310,12 +318,14 @@ pub fn get_apiextensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +360,7 @@ impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationAPIGroupResponse`]`>` constructor, or [`GetApiregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/".to_owned(); @@ -363,12 +374,14 @@ pub fn get_apiregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -403,6 +416,7 @@ impl crate::Response for GetApiregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1/".to_owned(); @@ -416,12 +430,14 @@ pub fn get_apiregistration_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -456,6 +472,7 @@ impl crate::Response for GetApiregistrationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1beta1/".to_owned(); @@ -469,12 +486,14 @@ pub fn get_apiregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -509,6 +528,7 @@ impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsAPIGroupResponse`]`>` constructor, or [`GetAppsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/".to_owned(); @@ -522,12 +542,14 @@ pub fn get_apps_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +584,7 @@ impl crate::Response for GetAppsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1APIResourcesResponse`]`>` constructor, or [`GetAppsV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1/".to_owned(); @@ -575,12 +598,14 @@ pub fn get_apps_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -615,6 +640,7 @@ impl crate::Response for GetAppsV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta1APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta1/".to_owned(); @@ -628,12 +654,14 @@ pub fn get_apps_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +696,7 @@ impl crate::Response for GetAppsV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta2APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta2/".to_owned(); @@ -681,12 +710,14 @@ pub fn get_apps_v1beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta2APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -721,6 +752,7 @@ impl crate::Response for GetAppsV1beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationAPIGroupResponse`]`>` constructor, or [`GetAuthenticationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/".to_owned(); @@ -734,12 +766,14 @@ pub fn get_authentication_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +808,7 @@ impl crate::Response for GetAuthenticationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1/".to_owned(); @@ -787,12 +822,14 @@ pub fn get_authentication_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -827,6 +864,7 @@ impl crate::Response for GetAuthenticationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1beta1/".to_owned(); @@ -840,12 +878,14 @@ pub fn get_authentication_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -880,6 +920,7 @@ impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationAPIGroupResponse`]`>` constructor, or [`GetAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/".to_owned(); @@ -893,12 +934,14 @@ pub fn get_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +976,7 @@ impl crate::Response for GetAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1/".to_owned(); @@ -946,12 +990,14 @@ pub fn get_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -986,6 +1032,7 @@ impl crate::Response for GetAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1beta1/".to_owned(); @@ -999,12 +1046,14 @@ pub fn get_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1039,6 +1088,7 @@ impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingAPIGroupResponse`]`>` constructor, or [`GetAutoscalingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/".to_owned(); @@ -1052,12 +1102,14 @@ pub fn get_autoscaling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1092,6 +1144,7 @@ impl crate::Response for GetAutoscalingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v1/".to_owned(); @@ -1105,12 +1158,14 @@ pub fn get_autoscaling_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1145,6 +1200,7 @@ impl crate::Response for GetAutoscalingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta1/".to_owned(); @@ -1158,12 +1214,14 @@ pub fn get_autoscaling_v2beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1198,6 +1256,7 @@ impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchAPIGroupResponse`]`>` constructor, or [`GetBatchAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/".to_owned(); @@ -1211,12 +1270,14 @@ pub fn get_batch_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1251,6 +1312,7 @@ impl crate::Response for GetBatchAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1APIResourcesResponse`]`>` constructor, or [`GetBatchV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1/".to_owned(); @@ -1264,12 +1326,14 @@ pub fn get_batch_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1304,6 +1368,7 @@ impl crate::Response for GetBatchV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1beta1APIResourcesResponse`]`>` constructor, or [`GetBatchV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1beta1/".to_owned(); @@ -1317,12 +1382,14 @@ pub fn get_batch_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1357,6 +1424,7 @@ impl crate::Response for GetBatchV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV2alpha1APIResourcesResponse`]`>` constructor, or [`GetBatchV2alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v2alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v2alpha1/".to_owned(); @@ -1370,12 +1438,14 @@ pub fn get_batch_v2alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v2alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV2alpha1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV2alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1410,6 +1480,7 @@ impl crate::Response for GetBatchV2alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesAPIGroupResponse`]`>` constructor, or [`GetCertificatesAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/".to_owned(); @@ -1423,12 +1494,14 @@ pub fn get_certificates_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1463,6 +1536,7 @@ impl crate::Response for GetCertificatesAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesV1beta1APIResourcesResponse`]`>` constructor, or [`GetCertificatesV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/v1beta1/".to_owned(); @@ -1476,12 +1550,14 @@ pub fn get_certificates_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1516,6 +1592,7 @@ impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { /// get the code version /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCodeVersionResponse`]`>` constructor, or [`GetCodeVersionResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_code_version( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/version/".to_owned(); @@ -1529,12 +1606,14 @@ pub fn get_code_version( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_code_version`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCodeVersionResponse { Ok(crate::v1_10::apimachinery::pkg::version::Info), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCodeVersionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1569,6 +1648,7 @@ impl crate::Response for GetCodeVersionResponse { /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreAPIVersionsResponse`]`>` constructor, or [`GetCoreAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/".to_owned(); @@ -1582,12 +1662,14 @@ pub fn get_core_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreAPIVersionsResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIVersions), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1622,6 +1704,7 @@ impl crate::Response for GetCoreAPIVersionsResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreV1APIResourcesResponse`]`>` constructor, or [`GetCoreV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/v1/".to_owned(); @@ -1635,12 +1718,14 @@ pub fn get_core_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreV1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1675,6 +1760,7 @@ impl crate::Response for GetCoreV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsAPIGroupResponse`]`>` constructor, or [`GetEventsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/".to_owned(); @@ -1688,12 +1774,14 @@ pub fn get_events_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1728,6 +1816,7 @@ impl crate::Response for GetEventsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsV1beta1APIResourcesResponse`]`>` constructor, or [`GetEventsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/v1beta1/".to_owned(); @@ -1741,12 +1830,14 @@ pub fn get_events_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1781,6 +1872,7 @@ impl crate::Response for GetEventsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsAPIGroupResponse`]`>` constructor, or [`GetExtensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/".to_owned(); @@ -1794,12 +1886,14 @@ pub fn get_extensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1834,6 +1928,7 @@ impl crate::Response for GetExtensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetExtensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/v1beta1/".to_owned(); @@ -1847,12 +1942,14 @@ pub fn get_extensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1887,6 +1984,7 @@ impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingAPIGroupResponse`]`>` constructor, or [`GetNetworkingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/".to_owned(); @@ -1900,12 +1998,14 @@ pub fn get_networking_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1940,6 +2040,7 @@ impl crate::Response for GetNetworkingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingV1APIResourcesResponse`]`>` constructor, or [`GetNetworkingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/v1/".to_owned(); @@ -1953,12 +2054,14 @@ pub fn get_networking_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingV1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1993,6 +2096,7 @@ impl crate::Response for GetNetworkingV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyAPIGroupResponse`]`>` constructor, or [`GetPolicyAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/".to_owned(); @@ -2006,12 +2110,14 @@ pub fn get_policy_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2046,6 +2152,7 @@ impl crate::Response for GetPolicyAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyV1beta1APIResourcesResponse`]`>` constructor, or [`GetPolicyV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/v1beta1/".to_owned(); @@ -2059,12 +2166,14 @@ pub fn get_policy_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2099,6 +2208,7 @@ impl crate::Response for GetPolicyV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationAPIGroupResponse`]`>` constructor, or [`GetRbacAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/".to_owned(); @@ -2112,12 +2222,14 @@ pub fn get_rbac_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2152,6 +2264,7 @@ impl crate::Response for GetRbacAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1/".to_owned(); @@ -2165,12 +2278,14 @@ pub fn get_rbac_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2205,6 +2320,7 @@ impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1alpha1/".to_owned(); @@ -2218,12 +2334,14 @@ pub fn get_rbac_authorization_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1alpha1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2258,6 +2376,7 @@ impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1beta1/".to_owned(); @@ -2271,12 +2390,14 @@ pub fn get_rbac_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2311,6 +2432,7 @@ impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingAPIGroupResponse`]`>` constructor, or [`GetSchedulingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/".to_owned(); @@ -2324,12 +2446,14 @@ pub fn get_scheduling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2364,6 +2488,7 @@ impl crate::Response for GetSchedulingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1alpha1/".to_owned(); @@ -2377,12 +2502,14 @@ pub fn get_scheduling_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1alpha1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2417,6 +2544,7 @@ impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsAPIGroupResponse`]`>` constructor, or [`GetSettingsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/".to_owned(); @@ -2430,12 +2558,14 @@ pub fn get_settings_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2470,6 +2600,7 @@ impl crate::Response for GetSettingsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSettingsV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/v1alpha1/".to_owned(); @@ -2483,12 +2614,14 @@ pub fn get_settings_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsV1alpha1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2523,6 +2656,7 @@ impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageAPIGroupResponse`]`>` constructor, or [`GetStorageAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/".to_owned(); @@ -2536,12 +2670,14 @@ pub fn get_storage_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageAPIGroupResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2576,6 +2712,7 @@ impl crate::Response for GetStorageAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1APIResourcesResponse`]`>` constructor, or [`GetStorageV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1/".to_owned(); @@ -2589,12 +2726,14 @@ pub fn get_storage_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2629,6 +2768,7 @@ impl crate::Response for GetStorageV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1alpha1APIResourcesResponse`]`>` constructor, or [`GetStorageV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1alpha1/".to_owned(); @@ -2642,12 +2782,14 @@ pub fn get_storage_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1alpha1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2682,6 +2824,7 @@ impl crate::Response for GetStorageV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1beta1APIResourcesResponse`]`>` constructor, or [`GetStorageV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1beta1/".to_owned(); @@ -2695,12 +2838,14 @@ pub fn get_storage_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1beta1APIResourcesResponse { Ok(crate::v1_10::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2739,6 +2884,7 @@ impl crate::Response for GetStorageV1beta1APIResourcesResponse { /// * `logpath` /// /// path to the log +#[cfg(feature = "api")] pub fn log_file_handler( logpath: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2755,11 +2901,13 @@ pub fn log_file_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2784,6 +2932,7 @@ impl crate::Response for LogFileHandlerResponse { // Generated from operation logFileListHandler /// Use the returned [`crate::ResponseBody`]`<`[`LogFileListHandlerResponse`]`>` constructor, or [`LogFileListHandlerResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn log_file_list_handler( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/logs/".to_owned(); @@ -2797,11 +2946,13 @@ pub fn log_file_list_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_list_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileListHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileListHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/admissionregistration/v1alpha1/initializer_configuration.rs b/src/v1_11/api/admissionregistration/v1alpha1/initializer_configuration.rs index bb1fc032c7..11196618e3 100644 --- a/src/v1_11/api/admissionregistration/v1alpha1/initializer_configuration.rs +++ b/src/v1_11/api/admissionregistration/v1alpha1/initializer_configuration.rs @@ -26,6 +26,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_initializer_configuration( body: &crate::v1_11::api::admissionregistration::v1alpha1::InitializerConfiguration, optional: CreateInitializerConfigurationOptional<'_>, @@ -51,6 +52,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateInitializerConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreateInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateInitializerConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1alpha1::InitializerConfiguration), @@ -66,6 +69,7 @@ pub enum CreateInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl InitializerConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_initializer_configuration( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -147,6 +152,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_collection_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionInitializerConfigurationResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_initializer_configuration( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteInitializerConfigurationResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeleteInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_initializer_configuration( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::list_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListInitializerConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1alpha1::InitializerConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_initializer_configuration( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::patch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchInitializerConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_initializer_configuration( name: &str, optional: ReadInitializerConfigurationOptional<'_>, @@ -477,6 +494,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadInitializerConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadInitializerConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_initializer_configuration( name: &str, body: &crate::v1_11::api::admissionregistration::v1alpha1::InitializerConfiguration, @@ -569,6 +590,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceInitializerConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplaceInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceInitializerConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1alpha1::InitializerConfiguration), @@ -583,6 +606,7 @@ pub enum ReplaceInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_initializer_configuration( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::watch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchInitializerConfigurationResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/admissionregistration/v1alpha1/mod.rs b/src/v1_11/api/admissionregistration/v1alpha1/mod.rs index b1ef774c7b..2657f18e2f 100644 --- a/src/v1_11/api/admissionregistration/v1alpha1/mod.rs +++ b/src/v1_11/api/admissionregistration/v1alpha1/mod.rs @@ -1,28 +1,20 @@ mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializer_configuration; -pub use self::initializer_configuration::{ - InitializerConfiguration, - CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse, - DeleteCollectionInitializerConfigurationResponse, - DeleteInitializerConfigurationResponse, - ListInitializerConfigurationResponse, - PatchInitializerConfigurationResponse, - ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse, - ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse, - WatchInitializerConfigurationResponse, -}; +pub use self::initializer_configuration::InitializerConfiguration; +#[cfg(feature = "api")] pub use self::initializer_configuration::{CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteCollectionInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::ListInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::PatchInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::WatchInitializerConfigurationResponse; mod initializer_configuration_list; -pub use self::initializer_configuration_list::{ - InitializerConfigurationList, -}; +pub use self::initializer_configuration_list::InitializerConfigurationList; mod rule; -pub use self::rule::{ - Rule, -}; +pub use self::rule::Rule; diff --git a/src/v1_11/api/admissionregistration/v1beta1/mod.rs b/src/v1_11/api/admissionregistration/v1beta1/mod.rs index 9e4dd8f5a8..7dd5906135 100644 --- a/src/v1_11/api/admissionregistration/v1beta1/mod.rs +++ b/src/v1_11/api/admissionregistration/v1beta1/mod.rs @@ -1,56 +1,40 @@ mod mutating_webhook_configuration; -pub use self::mutating_webhook_configuration::{ - MutatingWebhookConfiguration, - CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse, - DeleteCollectionMutatingWebhookConfigurationResponse, - DeleteMutatingWebhookConfigurationResponse, - ListMutatingWebhookConfigurationResponse, - PatchMutatingWebhookConfigurationResponse, - ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse, - ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse, - WatchMutatingWebhookConfigurationResponse, -}; +pub use self::mutating_webhook_configuration::MutatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteCollectionMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::ListMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::PatchMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::WatchMutatingWebhookConfigurationResponse; mod mutating_webhook_configuration_list; -pub use self::mutating_webhook_configuration_list::{ - MutatingWebhookConfigurationList, -}; +pub use self::mutating_webhook_configuration_list::MutatingWebhookConfigurationList; mod rule_with_operations; -pub use self::rule_with_operations::{ - RuleWithOperations, -}; +pub use self::rule_with_operations::RuleWithOperations; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod validating_webhook_configuration; -pub use self::validating_webhook_configuration::{ - ValidatingWebhookConfiguration, - CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse, - DeleteCollectionValidatingWebhookConfigurationResponse, - DeleteValidatingWebhookConfigurationResponse, - ListValidatingWebhookConfigurationResponse, - PatchValidatingWebhookConfigurationResponse, - ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse, - ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse, - WatchValidatingWebhookConfigurationResponse, -}; +pub use self::validating_webhook_configuration::ValidatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteCollectionValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::ListValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::PatchValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::WatchValidatingWebhookConfigurationResponse; mod validating_webhook_configuration_list; -pub use self::validating_webhook_configuration_list::{ - ValidatingWebhookConfigurationList, -}; +pub use self::validating_webhook_configuration_list::ValidatingWebhookConfigurationList; mod webhook; -pub use self::webhook::{ - Webhook, -}; +pub use self::webhook::Webhook; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; diff --git a/src/v1_11/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs b/src/v1_11/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs index 272cec4003..e574d768ca 100644 --- a/src/v1_11/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs +++ b/src/v1_11/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_mutating_webhook_configuration( body: &crate::v1_11::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, optional: CreateMutatingWebhookConfigurationOptional<'_>, @@ -51,6 +52,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateMutatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreateMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateMutatingWebhookConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -66,6 +69,7 @@ pub enum CreateMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl MutatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_mutating_webhook_configuration( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -147,6 +152,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_collection_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionMutatingWebhookConfigurationResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_mutating_webhook_configuration( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteMutatingWebhookConfigurationResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeleteMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_mutating_webhook_configuration( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::list_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListMutatingWebhookConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1beta1::MutatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_mutating_webhook_configuration( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::patch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchMutatingWebhookConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_mutating_webhook_configuration( name: &str, optional: ReadMutatingWebhookConfigurationOptional<'_>, @@ -477,6 +494,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadMutatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadMutatingWebhookConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_mutating_webhook_configuration( name: &str, body: &crate::v1_11::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, @@ -569,6 +590,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceMutatingWebhookConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -583,6 +606,7 @@ pub enum ReplaceMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_mutating_webhook_configuration( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::watch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchMutatingWebhookConfigurationResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/admissionregistration/v1beta1/validating_webhook_configuration.rs b/src/v1_11/api/admissionregistration/v1beta1/validating_webhook_configuration.rs index 92f332c29e..e44fbb4cb4 100644 --- a/src/v1_11/api/admissionregistration/v1beta1/validating_webhook_configuration.rs +++ b/src/v1_11/api/admissionregistration/v1beta1/validating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_validating_webhook_configuration( body: &crate::v1_11::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, optional: CreateValidatingWebhookConfigurationOptional<'_>, @@ -51,6 +52,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateValidatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreateValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateValidatingWebhookConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -66,6 +69,7 @@ pub enum CreateValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl ValidatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_validating_webhook_configuration( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -147,6 +152,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_collection_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionValidatingWebhookConfigurationResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_validating_webhook_configuration( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteValidatingWebhookConfigurationResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeleteValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_validating_webhook_configuration( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::list_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListValidatingWebhookConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1beta1::ValidatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_validating_webhook_configuration( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::patch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchValidatingWebhookConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_validating_webhook_configuration( name: &str, optional: ReadValidatingWebhookConfigurationOptional<'_>, @@ -477,6 +494,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadValidatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadValidatingWebhookConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_validating_webhook_configuration( name: &str, body: &crate::v1_11::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, @@ -569,6 +590,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceValidatingWebhookConfigurationResponse { Ok(crate::v1_11::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -583,6 +606,7 @@ pub enum ReplaceValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_validating_webhook_configuration( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::watch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchValidatingWebhookConfigurationResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1/controller_revision.rs b/src/v1_11/api/apps/v1/controller_revision.rs index efc5dd1a9f..dc0c251303 100644 --- a/src/v1_11/api/apps/v1/controller_revision.rs +++ b/src/v1_11/api/apps/v1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_11::api::apps::v1::ControllerRevision, @@ -61,6 +62,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1::ControllerRevision), @@ -76,6 +79,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,6 +716,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1::ControllerRevision), @@ -698,6 +724,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -767,12 +795,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -843,12 +874,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1/daemon_set.rs b/src/v1_11/api/apps/v1/daemon_set.rs index 294e7636d7..03a409eb09 100644 --- a/src/v1_11/api/apps/v1/daemon_set.rs +++ b/src/v1_11/api/apps/v1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_11::api::apps::v1::DaemonSet, @@ -61,6 +62,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_11::api::apps::v1::DaemonSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_11::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_11::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_11::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_11::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_11::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_11::api::apps::v1::DaemonSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_11::api::apps::v1::DaemonSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1/deployment.rs b/src/v1_11/api/apps/v1/deployment.rs index 541f6781e0..a9bf10f44f 100644 --- a/src/v1_11/api/apps/v1/deployment.rs +++ b/src/v1_11/api/apps/v1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_11::api::apps::v1::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::apps::v1::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1/mod.rs b/src/v1_11/api/apps/v1/mod.rs index a25b916f02..971a3fb358 100644 --- a/src/v1_11/api/apps/v1/mod.rs +++ b/src/v1_11/api/apps/v1/mod.rs @@ -1,202 +1,146 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_11/api/apps/v1/replica_set.rs b/src/v1_11/api/apps/v1/replica_set.rs index 01637d0f9d..f2b2bb0335 100644 --- a/src/v1_11/api/apps/v1/replica_set.rs +++ b/src/v1_11/api/apps/v1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_11::api::apps::v1::ReplicaSet, @@ -61,6 +62,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_11::api::apps::v1::ReplicaSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_11::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_11::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_11::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_11::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_11::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_11::api::apps::v1::ReplicaSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_11::api::apps::v1::ReplicaSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1/stateful_set.rs b/src/v1_11/api/apps/v1/stateful_set.rs index f7f9704763..80883dc0d9 100644 --- a/src/v1_11/api/apps/v1/stateful_set.rs +++ b/src/v1_11/api/apps/v1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_11::api::apps::v1::StatefulSet, @@ -63,6 +64,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -70,6 +72,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1::StatefulSet), @@ -78,6 +81,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -143,6 +147,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -166,6 +171,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -173,6 +179,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -256,6 +264,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -263,6 +272,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -323,6 +333,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -344,12 +355,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -393,6 +406,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -411,12 +425,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -497,12 +514,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -554,6 +573,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -583,12 +603,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_11::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -638,6 +660,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -674,6 +697,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -685,12 +709,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -740,6 +766,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -768,6 +795,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -775,12 +803,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_11::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -832,6 +862,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -862,6 +893,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -869,6 +901,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1::StatefulSet), @@ -876,6 +909,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -935,6 +969,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -965,6 +1000,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -972,6 +1008,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_11::api::apps::v1::StatefulSet), @@ -979,6 +1016,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1034,6 +1072,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1055,12 +1094,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1106,6 +1147,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1124,12 +1166,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1beta1/controller_revision.rs b/src/v1_11/api/apps/v1beta1/controller_revision.rs index 4582131219..8278154d5f 100644 --- a/src/v1_11/api/apps/v1beta1/controller_revision.rs +++ b/src/v1_11/api/apps/v1beta1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_11::api::apps::v1beta1::ControllerRevision, @@ -61,6 +62,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1beta1::ControllerRevision), @@ -76,6 +79,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,6 +716,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1beta1::ControllerRevision), @@ -698,6 +724,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -767,12 +795,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -843,12 +874,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1beta1/deployment.rs b/src/v1_11/api/apps/v1beta1/deployment.rs index ea9cead8ab..fc8661a889 100644 --- a/src/v1_11/api/apps/v1beta1/deployment.rs +++ b/src/v1_11/api/apps/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_11::api::apps::v1beta1::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1beta1::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1beta1::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::apps::v1beta1::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1beta1/deployment_rollback.rs b/src/v1_11/api/apps/v1beta1/deployment_rollback.rs index 539b113428..cbbbb0fd9c 100644 --- a/src/v1_11/api/apps/v1beta1/deployment_rollback.rs +++ b/src/v1_11/api/apps/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -67,6 +68,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// If 'true', then the output is pretty printed. @@ -74,6 +76,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -82,6 +85,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1beta1/mod.rs b/src/v1_11/api/apps/v1beta1/mod.rs index 93facd2f47..94ca19493a 100644 --- a/src/v1_11/api/apps/v1beta1/mod.rs +++ b/src/v1_11/api/apps/v1beta1/mod.rs @@ -1,148 +1,106 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_11/api/apps/v1beta1/scale.rs b/src/v1_11/api/apps/v1beta1/scale.rs index 423d0432e4..e8e19bf84b 100644 --- a/src/v1_11/api/apps/v1beta1/scale.rs +++ b/src/v1_11/api/apps/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_11::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -207,6 +213,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -235,6 +242,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -242,12 +250,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -325,6 +336,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -332,12 +344,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_11::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +403,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -419,6 +434,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -426,6 +442,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::apps::v1beta1::Scale), @@ -433,6 +450,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -492,6 +510,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -522,6 +541,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -529,6 +549,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_11::api::apps::v1beta1::Scale), @@ -536,6 +557,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1beta1/stateful_set.rs b/src/v1_11/api/apps/v1beta1/stateful_set.rs index ce2b6ab8e3..53fb344bd6 100644 --- a/src/v1_11/api/apps/v1beta1/stateful_set.rs +++ b/src/v1_11/api/apps/v1beta1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_11::api::apps::v1beta1::StatefulSet, @@ -63,6 +64,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -70,6 +72,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1beta1::StatefulSet), @@ -78,6 +81,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -143,6 +147,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -166,6 +171,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -173,6 +179,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -256,6 +264,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -263,6 +272,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -323,6 +333,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -344,12 +355,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -393,6 +406,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -411,12 +425,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -497,12 +514,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -554,6 +573,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -583,12 +603,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -638,6 +660,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -674,6 +697,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -685,12 +709,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -740,6 +766,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -768,6 +795,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -775,12 +803,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -832,6 +862,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -862,6 +893,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -869,6 +901,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1beta1::StatefulSet), @@ -876,6 +909,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -935,6 +969,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -965,6 +1000,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -972,6 +1008,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta1::StatefulSet), @@ -979,6 +1016,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1034,6 +1072,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1055,12 +1094,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1106,6 +1147,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1124,12 +1166,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1beta2/controller_revision.rs b/src/v1_11/api/apps/v1beta2/controller_revision.rs index c62c31fd30..97ac8d25a2 100644 --- a/src/v1_11/api/apps/v1beta2/controller_revision.rs +++ b/src/v1_11/api/apps/v1beta2/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_11::api::apps::v1beta2::ControllerRevision, @@ -61,6 +62,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1beta2::ControllerRevision), @@ -76,6 +79,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,6 +716,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_11::api::apps::v1beta2::ControllerRevision), @@ -698,6 +724,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -767,12 +795,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -843,12 +874,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1beta2/daemon_set.rs b/src/v1_11/api/apps/v1beta2/daemon_set.rs index b67f220520..54ba9d6d0e 100644 --- a/src/v1_11/api/apps/v1beta2/daemon_set.rs +++ b/src/v1_11/api/apps/v1beta2/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_11::api::apps::v1beta2::DaemonSet, @@ -61,6 +62,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_11::api::apps::v1beta2::DaemonSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_11::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_11::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_11::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_11::api::apps::v1beta2::DaemonSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::DaemonSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1beta2/deployment.rs b/src/v1_11/api/apps/v1beta2/deployment.rs index e097c60c7e..737ba0bcac 100644 --- a/src/v1_11/api/apps/v1beta2/deployment.rs +++ b/src/v1_11/api/apps/v1beta2/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_11::api::apps::v1beta2::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1beta2::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_11::api::apps::v1beta2::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1beta2/mod.rs b/src/v1_11/api/apps/v1beta2/mod.rs index a95884f4d6..60c611aefd 100644 --- a/src/v1_11/api/apps/v1beta2/mod.rs +++ b/src/v1_11/api/apps/v1beta2/mod.rs @@ -1,226 +1,164 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_11/api/apps/v1beta2/replica_set.rs b/src/v1_11/api/apps/v1beta2/replica_set.rs index febffbe38c..121c26e02e 100644 --- a/src/v1_11/api/apps/v1beta2/replica_set.rs +++ b/src/v1_11/api/apps/v1beta2/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_11::api::apps::v1beta2::ReplicaSet, @@ -61,6 +62,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_11::api::apps::v1beta2::ReplicaSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_11::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_11::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_11::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_11::api::apps::v1beta2::ReplicaSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::ReplicaSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1beta2/scale.rs b/src/v1_11/api/apps/v1beta2/scale.rs index b90467dc47..d930997ddb 100644 --- a/src/v1_11/api/apps/v1beta2/scale.rs +++ b/src/v1_11/api/apps/v1beta2/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_11::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_11::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_11::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_11::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -595,6 +617,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -602,6 +625,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::apps::v1beta2::Scale), @@ -609,6 +633,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +693,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -698,6 +724,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -705,6 +732,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_11::api::apps::v1beta2::Scale), @@ -712,6 +740,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +800,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -801,6 +831,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -808,6 +839,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_11::api::apps::v1beta2::Scale), @@ -815,6 +847,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/apps/v1beta2/stateful_set.rs b/src/v1_11/api/apps/v1beta2/stateful_set.rs index 9806f2d366..0c59682241 100644 --- a/src/v1_11/api/apps/v1beta2/stateful_set.rs +++ b/src/v1_11/api/apps/v1beta2/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_11::api::apps::v1beta2::StatefulSet, @@ -63,6 +64,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -70,6 +72,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1beta2::StatefulSet), @@ -78,6 +81,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -143,6 +147,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -166,6 +171,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -173,6 +179,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -256,6 +264,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -263,6 +272,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -323,6 +333,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -344,12 +355,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -393,6 +406,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -411,12 +425,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_11::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -497,12 +514,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -554,6 +573,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -583,12 +603,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -638,6 +660,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -674,6 +697,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -685,12 +709,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -740,6 +766,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -768,6 +795,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -775,12 +803,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -832,6 +862,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -862,6 +893,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -869,6 +901,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_11::api::apps::v1beta2::StatefulSet), @@ -876,6 +909,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -935,6 +969,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -965,6 +1000,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -972,6 +1008,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_11::api::apps::v1beta2::StatefulSet), @@ -979,6 +1016,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1034,6 +1072,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1055,12 +1094,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1106,6 +1147,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1124,12 +1166,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/authentication/v1/mod.rs b/src/v1_11/api/authentication/v1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_11/api/authentication/v1/mod.rs +++ b/src/v1_11/api/authentication/v1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_11/api/authentication/v1/token_review.rs b/src/v1_11/api/authentication/v1/token_review.rs index 0a85e3ea62..9907db7dc8 100644 --- a/src/v1_11/api/authentication/v1/token_review.rs +++ b/src/v1_11/api/authentication/v1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_11::api::authentication::v1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -53,6 +54,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_11::api::authentication::v1::TokenReview), @@ -68,6 +71,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/authentication/v1beta1/mod.rs b/src/v1_11/api/authentication/v1beta1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_11/api/authentication/v1beta1/mod.rs +++ b/src/v1_11/api/authentication/v1beta1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_11/api/authentication/v1beta1/token_review.rs b/src/v1_11/api/authentication/v1beta1/token_review.rs index 002c905ead..3d590d5065 100644 --- a/src/v1_11/api/authentication/v1beta1/token_review.rs +++ b/src/v1_11/api/authentication/v1beta1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_11::api::authentication::v1beta1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -53,6 +54,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_11::api::authentication::v1beta1::TokenReview), @@ -68,6 +71,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/authorization/v1/local_subject_access_review.rs b/src/v1_11/api/authorization/v1/local_subject_access_review.rs index 73c290b1ba..c25ad22ca8 100644 --- a/src/v1_11/api/authorization/v1/local_subject_access_review.rs +++ b/src/v1_11/api/authorization/v1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_11::api::authorization::v1::LocalSubjectAccessReview, @@ -60,6 +61,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,6 +69,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_11::api::authorization::v1::LocalSubjectAccessReview), @@ -75,6 +78,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/authorization/v1/mod.rs b/src/v1_11/api/authorization/v1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_11/api/authorization/v1/mod.rs +++ b/src/v1_11/api/authorization/v1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_11/api/authorization/v1/self_subject_access_review.rs b/src/v1_11/api/authorization/v1/self_subject_access_review.rs index 753209b53b..a7bcdbc37a 100644 --- a/src/v1_11/api/authorization/v1/self_subject_access_review.rs +++ b/src/v1_11/api/authorization/v1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_11::api::authorization::v1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_11::api::authorization::v1::SelfSubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/authorization/v1/self_subject_rules_review.rs b/src/v1_11/api/authorization/v1/self_subject_rules_review.rs index e372fa98b7..28c3d3b6b1 100644 --- a/src/v1_11/api/authorization/v1/self_subject_rules_review.rs +++ b/src/v1_11/api/authorization/v1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_11::api::authorization::v1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_11::api::authorization::v1::SelfSubjectRulesReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/authorization/v1/subject_access_review.rs b/src/v1_11/api/authorization/v1/subject_access_review.rs index 814952876c..54886066ee 100644 --- a/src/v1_11/api/authorization/v1/subject_access_review.rs +++ b/src/v1_11/api/authorization/v1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_11::api::authorization::v1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_11::api::authorization::v1::SubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/authorization/v1beta1/local_subject_access_review.rs b/src/v1_11/api/authorization/v1beta1/local_subject_access_review.rs index ee2e4ce420..147526617c 100644 --- a/src/v1_11/api/authorization/v1beta1/local_subject_access_review.rs +++ b/src/v1_11/api/authorization/v1beta1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_11::api::authorization::v1beta1::LocalSubjectAccessReview, @@ -60,6 +61,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,6 +69,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_11::api::authorization::v1beta1::LocalSubjectAccessReview), @@ -75,6 +78,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/authorization/v1beta1/mod.rs b/src/v1_11/api/authorization/v1beta1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_11/api/authorization/v1beta1/mod.rs +++ b/src/v1_11/api/authorization/v1beta1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_11/api/authorization/v1beta1/self_subject_access_review.rs b/src/v1_11/api/authorization/v1beta1/self_subject_access_review.rs index 48d50139f3..b8cffab0e2 100644 --- a/src/v1_11/api/authorization/v1beta1/self_subject_access_review.rs +++ b/src/v1_11/api/authorization/v1beta1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_11::api::authorization::v1beta1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_11::api::authorization::v1beta1::SelfSubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/authorization/v1beta1/self_subject_rules_review.rs b/src/v1_11/api/authorization/v1beta1/self_subject_rules_review.rs index ce18ad3375..09a93cb76d 100644 --- a/src/v1_11/api/authorization/v1beta1/self_subject_rules_review.rs +++ b/src/v1_11/api/authorization/v1beta1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_11::api::authorization::v1beta1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_11::api::authorization::v1beta1::SelfSubjectRulesReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/authorization/v1beta1/subject_access_review.rs b/src/v1_11/api/authorization/v1beta1/subject_access_review.rs index 0aaaebd7a1..27c503caf6 100644 --- a/src/v1_11/api/authorization/v1beta1/subject_access_review.rs +++ b/src/v1_11/api/authorization/v1beta1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_11::api::authorization::v1beta1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_11::api::authorization::v1beta1::SubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/autoscaling/v1/horizontal_pod_autoscaler.rs b/src/v1_11/api/autoscaling/v1/horizontal_pod_autoscaler.rs index bf9ae31e66..b35765dfdf 100644 --- a/src/v1_11/api/autoscaling/v1/horizontal_pod_autoscaler.rs +++ b/src/v1_11/api/autoscaling/v1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_11::api::autoscaling::v1::HorizontalPodAutoscaler, @@ -61,6 +62,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -76,6 +79,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_11::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_11::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_11::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_11::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/autoscaling/v1/mod.rs b/src/v1_11/api/autoscaling/v1/mod.rs index a4f7a0312d..09ed1f1487 100644 --- a/src/v1_11/api/autoscaling/v1/mod.rs +++ b/src/v1_11/api/autoscaling/v1/mod.rs @@ -1,65 +1,49 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - PatchNamespacedReplicationControllerScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, - ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; diff --git a/src/v1_11/api/autoscaling/v1/scale.rs b/src/v1_11/api/autoscaling/v1/scale.rs index 4923d7aef4..4489a28357 100644 --- a/src/v1_11/api/autoscaling/v1/scale.rs +++ b/src/v1_11/api/autoscaling/v1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -295,6 +304,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -324,12 +334,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -379,6 +391,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -407,6 +420,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -414,12 +428,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -497,6 +514,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -504,12 +522,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -559,6 +579,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -587,6 +608,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -594,12 +616,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -649,6 +673,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -677,6 +702,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -684,12 +710,14 @@ pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +769,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -771,6 +800,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -778,6 +808,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), @@ -785,6 +816,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -844,6 +876,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -874,6 +907,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -881,6 +915,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), @@ -888,6 +923,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -947,6 +983,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -977,6 +1014,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -984,6 +1022,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), @@ -991,6 +1030,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1050,6 +1090,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -1080,6 +1121,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1087,6 +1129,7 @@ pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerScaleResponse { Ok(crate::v1_11::api::autoscaling::v1::Scale), @@ -1094,6 +1137,7 @@ pub enum ReplaceNamespacedReplicationControllerScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs b/src/v1_11/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs index 849bf61359..b3fdfadde0 100644 --- a/src/v1_11/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs +++ b/src/v1_11/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_11::api::autoscaling::v2beta1::HorizontalPodAutoscaler, @@ -61,6 +62,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -76,6 +79,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_11::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_11::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_11::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_11::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/autoscaling/v2beta1/mod.rs b/src/v1_11/api/autoscaling/v2beta1/mod.rs index edb3c1e242..83788a8cb3 100644 --- a/src/v1_11/api/autoscaling/v2beta1/mod.rs +++ b/src/v1_11/api/autoscaling/v2beta1/mod.rs @@ -1,93 +1,61 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod external_metric_source; -pub use self::external_metric_source::{ - ExternalMetricSource, -}; +pub use self::external_metric_source::ExternalMetricSource; mod external_metric_status; -pub use self::external_metric_status::{ - ExternalMetricStatus, -}; +pub use self::external_metric_status::ExternalMetricStatus; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_11/api/batch/v1/job.rs b/src/v1_11/api/batch/v1/job.rs index b0dc313f78..c4ed9bbd5d 100644 --- a/src/v1_11/api/batch/v1/job.rs +++ b/src/v1_11/api/batch/v1/job.rs @@ -33,6 +33,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_job( namespace: &str, body: &crate::v1_11::api::batch::v1::Job, @@ -61,6 +62,7 @@ impl Job { } /// Optional parameters of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedJobResponse { Ok(crate::v1_11::api::batch::v1::Job), @@ -76,6 +79,7 @@ pub enum CreateNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Job { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_job( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_collection_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedJobResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_job( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedJobResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_job_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListJobForAllNamespacesResponse { Ok(crate::v1_11::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_job( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedJobResponse { Ok(crate::v1_11::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobResponse { Ok(crate::v1_11::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobStatusResponse { Ok(crate::v1_11::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobResponse { Ok(crate::v1_11::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobStatusResponse { Ok(crate::v1_11::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobResponse { Ok(crate::v1_11::api::batch::v1::Job), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobStatusResponse { Ok(crate::v1_11::api::batch::v1::Job), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_job_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchJobForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_job( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedJobResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/batch/v1/mod.rs b/src/v1_11/api/batch/v1/mod.rs index 68e7a18867..97d7bccb74 100644 --- a/src/v1_11/api/batch/v1/mod.rs +++ b/src/v1_11/api/batch/v1/mod.rs @@ -1,38 +1,28 @@ mod job; -pub use self::job::{ - Job, - CreateNamespacedJobOptional, CreateNamespacedJobResponse, - DeleteCollectionNamespacedJobResponse, - DeleteNamespacedJobResponse, - ListJobForAllNamespacesResponse, - ListNamespacedJobResponse, - PatchNamespacedJobResponse, - PatchNamespacedJobStatusResponse, - ReadNamespacedJobOptional, ReadNamespacedJobResponse, - ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse, - ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse, - ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse, - WatchJobForAllNamespacesResponse, - WatchNamespacedJobResponse, -}; +pub use self::job::Job; +#[cfg(feature = "api")] pub use self::job::{CreateNamespacedJobOptional, CreateNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::DeleteCollectionNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::DeleteNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::ListJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::ListNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobStatusResponse; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobOptional, ReadNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::WatchJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::WatchNamespacedJobResponse; mod job_condition; -pub use self::job_condition::{ - JobCondition, -}; +pub use self::job_condition::JobCondition; mod job_list; -pub use self::job_list::{ - JobList, -}; +pub use self::job_list::JobList; mod job_spec; -pub use self::job_spec::{ - JobSpec, -}; +pub use self::job_spec::JobSpec; mod job_status; -pub use self::job_status::{ - JobStatus, -}; +pub use self::job_status::JobStatus; diff --git a/src/v1_11/api/batch/v1beta1/cron_job.rs b/src/v1_11/api/batch/v1beta1/cron_job.rs index 52ea21701b..46bf223922 100644 --- a/src/v1_11/api/batch/v1beta1/cron_job.rs +++ b/src/v1_11/api/batch/v1beta1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_11::api::batch::v1beta1::CronJob, @@ -61,6 +62,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_11::api::batch::v1beta1::CronJob), @@ -76,6 +79,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_11::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_11::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_11::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_11::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_11::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_11::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_11::api::batch::v1beta1::CronJob), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_11::api::batch::v1beta1::CronJob), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/batch/v1beta1/mod.rs b/src/v1_11/api/batch/v1beta1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_11/api/batch/v1beta1/mod.rs +++ b/src/v1_11/api/batch/v1beta1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_11/api/batch/v2alpha1/cron_job.rs b/src/v1_11/api/batch/v2alpha1/cron_job.rs index a765f8f8e1..1825d31b37 100644 --- a/src/v1_11/api/batch/v2alpha1/cron_job.rs +++ b/src/v1_11/api/batch/v2alpha1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_11::api::batch::v2alpha1::CronJob, @@ -61,6 +62,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_11::api::batch::v2alpha1::CronJob), @@ -76,6 +79,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_11::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_11::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_11::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_11::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_11::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_11::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_11::api::batch::v2alpha1::CronJob), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_11::api::batch::v2alpha1::CronJob), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/batch/v2alpha1/mod.rs b/src/v1_11/api/batch/v2alpha1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_11/api/batch/v2alpha1/mod.rs +++ b/src/v1_11/api/batch/v2alpha1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_11/api/certificates/v1beta1/certificate_signing_request.rs b/src/v1_11/api/certificates/v1beta1/certificate_signing_request.rs index fe8e52439a..14bf7b57e6 100644 --- a/src/v1_11/api/certificates/v1beta1/certificate_signing_request.rs +++ b/src/v1_11/api/certificates/v1beta1/certificate_signing_request.rs @@ -28,6 +28,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_certificate_signing_request( body: &crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest, optional: CreateCertificateSigningRequestOptional<'_>, @@ -53,6 +54,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCertificateSigningRequestOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCertificateSigningRequestResponse { Ok(crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest), @@ -68,6 +71,7 @@ pub enum CreateCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -129,6 +133,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_certificate_signing_request( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -148,6 +153,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCertificateSigningRequestResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -155,6 +161,7 @@ pub enum DeleteCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -213,6 +220,7 @@ impl CertificateSigningRequest { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_certificate_signing_request( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -233,6 +241,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_collection_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCertificateSigningRequestResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteCollectionCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_certificate_signing_request( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::list_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCertificateSigningRequestResponse { Ok(crate::v1_11::api::certificates::v1beta1::CertificateSigningRequestList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -394,12 +408,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestResponse { Ok(crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -447,6 +463,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request_status( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -474,12 +491,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestStatusResponse { Ok(crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -525,6 +544,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request( name: &str, optional: ReadCertificateSigningRequestOptional<'_>, @@ -559,6 +579,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -570,12 +591,14 @@ pub struct ReadCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestResponse { Ok(crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -621,6 +644,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request_status( name: &str, optional: ReadCertificateSigningRequestStatusOptional<'_>, @@ -647,6 +671,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -654,12 +679,14 @@ pub struct ReadCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestStatusResponse { Ok(crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -707,6 +734,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request( name: &str, body: &crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest, @@ -735,6 +763,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestOptional<'a> { /// If 'true', then the output is pretty printed. @@ -742,6 +771,7 @@ pub struct ReplaceCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestResponse { Ok(crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest), @@ -749,6 +779,7 @@ pub enum ReplaceCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -804,6 +835,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_approval( name: &str, body: &crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest, @@ -832,6 +864,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { /// If 'true', then the output is pretty printed. @@ -839,6 +872,7 @@ pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestApprovalResponse { Ok(crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest), @@ -846,6 +880,7 @@ pub enum ReplaceCertificateSigningRequestApprovalResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestApprovalResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -901,6 +936,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_status( name: &str, body: &crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest, @@ -929,6 +965,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -936,6 +973,7 @@ pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestStatusResponse { Ok(crate::v1_11::api::certificates::v1beta1::CertificateSigningRequest), @@ -943,6 +981,7 @@ pub enum ReplaceCertificateSigningRequestStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -994,6 +1033,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_certificate_signing_request( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1012,12 +1052,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::watch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCertificateSigningRequestResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/certificates/v1beta1/mod.rs b/src/v1_11/api/certificates/v1beta1/mod.rs index 48cb9add17..bb9e9e4c0a 100644 --- a/src/v1_11/api/certificates/v1beta1/mod.rs +++ b/src/v1_11/api/certificates/v1beta1/mod.rs @@ -1,37 +1,27 @@ mod certificate_signing_request; -pub use self::certificate_signing_request::{ - CertificateSigningRequest, - CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse, - DeleteCertificateSigningRequestResponse, - DeleteCollectionCertificateSigningRequestResponse, - ListCertificateSigningRequestResponse, - PatchCertificateSigningRequestResponse, - PatchCertificateSigningRequestStatusResponse, - ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse, - ReadCertificateSigningRequestStatusOptional, ReadCertificateSigningRequestStatusResponse, - ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse, - ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse, - ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse, - WatchCertificateSigningRequestResponse, -}; +pub use self::certificate_signing_request::CertificateSigningRequest; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCollectionCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::ListCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestStatusResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestStatusOptional, ReadCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::WatchCertificateSigningRequestResponse; mod certificate_signing_request_condition; -pub use self::certificate_signing_request_condition::{ - CertificateSigningRequestCondition, -}; +pub use self::certificate_signing_request_condition::CertificateSigningRequestCondition; mod certificate_signing_request_list; -pub use self::certificate_signing_request_list::{ - CertificateSigningRequestList, -}; +pub use self::certificate_signing_request_list::CertificateSigningRequestList; mod certificate_signing_request_spec; -pub use self::certificate_signing_request_spec::{ - CertificateSigningRequestSpec, -}; +pub use self::certificate_signing_request_spec::CertificateSigningRequestSpec; mod certificate_signing_request_status; -pub use self::certificate_signing_request_status::{ - CertificateSigningRequestStatus, -}; +pub use self::certificate_signing_request_status::CertificateSigningRequestStatus; diff --git a/src/v1_11/api/core/v1/binding.rs b/src/v1_11/api/core/v1/binding.rs index 10689caa9d..38335e5292 100644 --- a/src/v1_11/api/core/v1/binding.rs +++ b/src/v1_11/api/core/v1/binding.rs @@ -30,6 +30,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_binding( namespace: &str, body: &crate::v1_11::api::core::v1::Binding, @@ -58,6 +59,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedBindingResponse { Ok(crate::v1_11::api::core::v1::Binding), @@ -73,6 +76,7 @@ pub enum CreateNamespacedBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -140,6 +144,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_binding( name: &str, namespace: &str, @@ -170,6 +175,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -177,6 +183,7 @@ pub struct CreateNamespacedPodBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodBindingResponse { Ok(crate::v1_11::api::core::v1::Binding), @@ -185,6 +192,7 @@ pub enum CreateNamespacedPodBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/component_status.rs b/src/v1_11/api/core/v1/component_status.rs index 04ba7664d0..21f58113b2 100644 --- a/src/v1_11/api/core/v1/component_status.rs +++ b/src/v1_11/api/core/v1/component_status.rs @@ -26,6 +26,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_component_status( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -44,12 +45,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::list_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListComponentStatusResponse { Ok(crate::v1_11::api::core::v1::ComponentStatusList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -95,6 +98,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_component_status( name: &str, optional: ReadComponentStatusOptional<'_>, @@ -121,6 +125,7 @@ impl ComponentStatus { } /// Optional parameters of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadComponentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -128,12 +133,14 @@ pub struct ReadComponentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadComponentStatusResponse { Ok(crate::v1_11::api::core::v1::ComponentStatus), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -177,6 +184,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_component_status( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -195,12 +203,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::watch_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchComponentStatusResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/config_map.rs b/src/v1_11/api/core/v1/config_map.rs index 8026f952a3..9839722b2f 100644 --- a/src/v1_11/api/core/v1/config_map.rs +++ b/src/v1_11/api/core/v1/config_map.rs @@ -33,6 +33,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_config_map( namespace: &str, body: &crate::v1_11::api::core::v1::ConfigMap, @@ -61,6 +62,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedConfigMapOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedConfigMapResponse { Ok(crate::v1_11::api::core::v1::ConfigMap), @@ -76,6 +79,7 @@ pub enum CreateNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ConfigMap { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_config_map( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_collection_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedConfigMapResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_config_map( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedConfigMapResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_config_map_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListConfigMapForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_config_map( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedConfigMapResponse { Ok(crate::v1_11::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_config_map( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::patch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedConfigMapResponse { Ok(crate::v1_11::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_config_map( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedConfigMapOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedConfigMapResponse { Ok(crate::v1_11::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_config_map( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedConfigMapOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,6 +716,7 @@ pub struct ReplaceNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedConfigMapResponse { Ok(crate::v1_11::api::core::v1::ConfigMap), @@ -698,6 +724,7 @@ pub enum ReplaceNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_config_map_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -767,12 +795,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchConfigMapForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_config_map( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -843,12 +874,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedConfigMapResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/endpoints.rs b/src/v1_11/api/core/v1/endpoints.rs index 5c0409b2ce..25bd5a3cc5 100644 --- a/src/v1_11/api/core/v1/endpoints.rs +++ b/src/v1_11/api/core/v1/endpoints.rs @@ -41,6 +41,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_endpoints( namespace: &str, body: &crate::v1_11::api::core::v1::Endpoints, @@ -69,6 +70,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEndpointsOptional<'a> { /// If 'true', then the output is pretty printed. @@ -76,6 +78,7 @@ pub struct CreateNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEndpointsResponse { Ok(crate::v1_11::api::core::v1::Endpoints), @@ -84,6 +87,7 @@ pub enum CreateNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -149,6 +153,7 @@ impl Endpoints { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_endpoints( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -172,6 +177,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_collection_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEndpointsResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -179,6 +185,7 @@ pub enum DeleteCollectionNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -241,6 +248,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_endpoints( name: &str, namespace: &str, @@ -262,6 +270,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEndpointsResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -269,6 +278,7 @@ pub enum DeleteNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -325,6 +335,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_endpoints_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -343,12 +354,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEndpointsForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -396,6 +409,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_endpoints( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -417,12 +431,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEndpointsResponse { Ok(crate::v1_11::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -474,6 +490,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_endpoints( name: &str, namespace: &str, @@ -503,12 +520,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::patch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEndpointsResponse { Ok(crate::v1_11::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -558,6 +577,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_endpoints( name: &str, namespace: &str, @@ -594,6 +614,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEndpointsOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -605,12 +626,14 @@ pub struct ReadNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEndpointsResponse { Ok(crate::v1_11::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -662,6 +685,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_endpoints( name: &str, namespace: &str, @@ -692,6 +716,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEndpointsOptional<'a> { /// If 'true', then the output is pretty printed. @@ -699,6 +724,7 @@ pub struct ReplaceNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEndpointsResponse { Ok(crate::v1_11::api::core::v1::Endpoints), @@ -706,6 +732,7 @@ pub enum ReplaceNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -757,6 +784,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_endpoints_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -775,12 +803,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEndpointsForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_endpoints( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -851,12 +882,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEndpointsResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/event.rs b/src/v1_11/api/core/v1/event.rs index a995e82f3c..93a82f1589 100644 --- a/src/v1_11/api/core/v1/event.rs +++ b/src/v1_11/api/core/v1/event.rs @@ -69,6 +69,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_11::api::core::v1::Event, @@ -97,6 +98,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -104,6 +106,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_11::api::core::v1::Event), @@ -112,6 +115,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -177,6 +181,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -200,6 +205,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -207,6 +213,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -269,6 +276,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -290,6 +298,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -297,6 +306,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -353,6 +363,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -371,12 +382,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -424,6 +437,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -445,12 +459,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_11::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -502,6 +518,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -531,12 +548,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_11::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -586,6 +605,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -622,6 +642,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -633,12 +654,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_11::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -690,6 +713,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -720,6 +744,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -727,6 +752,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_11::api::core::v1::Event), @@ -734,6 +760,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -785,6 +812,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -803,12 +831,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -858,6 +888,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -879,12 +910,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/limit_range.rs b/src/v1_11/api/core/v1/limit_range.rs index 60fb64de85..b554567259 100644 --- a/src/v1_11/api/core/v1/limit_range.rs +++ b/src/v1_11/api/core/v1/limit_range.rs @@ -30,6 +30,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_limit_range( namespace: &str, body: &crate::v1_11::api::core::v1::LimitRange, @@ -58,6 +59,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLimitRangeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLimitRangeResponse { Ok(crate::v1_11::api::core::v1::LimitRange), @@ -73,6 +76,7 @@ pub enum CreateNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl LimitRange { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_limit_range( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_collection_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLimitRangeResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_limit_range( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLimitRangeResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -314,6 +324,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_limit_range_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -332,12 +343,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLimitRangeForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -385,6 +398,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_limit_range( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -406,12 +420,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLimitRangeResponse { Ok(crate::v1_11::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_limit_range( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::patch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLimitRangeResponse { Ok(crate::v1_11::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_limit_range( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLimitRangeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLimitRangeResponse { Ok(crate::v1_11::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_limit_range( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLimitRangeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLimitRangeResponse { Ok(crate::v1_11::api::core::v1::LimitRange), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -746,6 +773,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_limit_range_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -764,12 +792,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLimitRangeForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -819,6 +849,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_limit_range( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -840,12 +871,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLimitRangeResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/mod.rs b/src/v1_11/api/core/v1/mod.rs index 28ae034909..633899e82e 100644 --- a/src/v1_11/api/core/v1/mod.rs +++ b/src/v1_11/api/core/v1/mod.rs @@ -1,1089 +1,737 @@ mod aws_elastic_block_store_volume_source; -pub use self::aws_elastic_block_store_volume_source::{ - AWSElasticBlockStoreVolumeSource, -}; +pub use self::aws_elastic_block_store_volume_source::AWSElasticBlockStoreVolumeSource; mod affinity; -pub use self::affinity::{ - Affinity, -}; +pub use self::affinity::Affinity; mod attached_volume; -pub use self::attached_volume::{ - AttachedVolume, -}; +pub use self::attached_volume::AttachedVolume; mod azure_disk_volume_source; -pub use self::azure_disk_volume_source::{ - AzureDiskVolumeSource, -}; +pub use self::azure_disk_volume_source::AzureDiskVolumeSource; mod azure_file_persistent_volume_source; -pub use self::azure_file_persistent_volume_source::{ - AzureFilePersistentVolumeSource, -}; +pub use self::azure_file_persistent_volume_source::AzureFilePersistentVolumeSource; mod azure_file_volume_source; -pub use self::azure_file_volume_source::{ - AzureFileVolumeSource, -}; +pub use self::azure_file_volume_source::AzureFileVolumeSource; mod binding; -pub use self::binding::{ - Binding, - CreateNamespacedBindingOptional, CreateNamespacedBindingResponse, - CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse, -}; +pub use self::binding::Binding; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedBindingOptional, CreateNamespacedBindingResponse}; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse}; mod csi_persistent_volume_source; -pub use self::csi_persistent_volume_source::{ - CSIPersistentVolumeSource, -}; +pub use self::csi_persistent_volume_source::CSIPersistentVolumeSource; mod capabilities; -pub use self::capabilities::{ - Capabilities, -}; +pub use self::capabilities::Capabilities; mod ceph_fs_persistent_volume_source; -pub use self::ceph_fs_persistent_volume_source::{ - CephFSPersistentVolumeSource, -}; +pub use self::ceph_fs_persistent_volume_source::CephFSPersistentVolumeSource; mod ceph_fs_volume_source; -pub use self::ceph_fs_volume_source::{ - CephFSVolumeSource, -}; +pub use self::ceph_fs_volume_source::CephFSVolumeSource; mod cinder_persistent_volume_source; -pub use self::cinder_persistent_volume_source::{ - CinderPersistentVolumeSource, -}; +pub use self::cinder_persistent_volume_source::CinderPersistentVolumeSource; mod cinder_volume_source; -pub use self::cinder_volume_source::{ - CinderVolumeSource, -}; +pub use self::cinder_volume_source::CinderVolumeSource; mod client_ip_config; -pub use self::client_ip_config::{ - ClientIPConfig, -}; +pub use self::client_ip_config::ClientIPConfig; mod component_condition; -pub use self::component_condition::{ - ComponentCondition, -}; +pub use self::component_condition::ComponentCondition; mod component_status; -pub use self::component_status::{ - ComponentStatus, - ListComponentStatusResponse, - ReadComponentStatusOptional, ReadComponentStatusResponse, - WatchComponentStatusResponse, -}; +pub use self::component_status::ComponentStatus; +#[cfg(feature = "api")] pub use self::component_status::ListComponentStatusResponse; +#[cfg(feature = "api")] pub use self::component_status::{ReadComponentStatusOptional, ReadComponentStatusResponse}; +#[cfg(feature = "api")] pub use self::component_status::WatchComponentStatusResponse; mod component_status_list; -pub use self::component_status_list::{ - ComponentStatusList, -}; +pub use self::component_status_list::ComponentStatusList; mod config_map; -pub use self::config_map::{ - ConfigMap, - CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse, - DeleteCollectionNamespacedConfigMapResponse, - DeleteNamespacedConfigMapResponse, - ListConfigMapForAllNamespacesResponse, - ListNamespacedConfigMapResponse, - PatchNamespacedConfigMapResponse, - ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse, - ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse, - WatchConfigMapForAllNamespacesResponse, - WatchNamespacedConfigMapResponse, -}; +pub use self::config_map::ConfigMap; +#[cfg(feature = "api")] pub use self::config_map::{CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::DeleteCollectionNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::DeleteNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::ListConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::ListNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::PatchNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::{ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::{ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::WatchConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::WatchNamespacedConfigMapResponse; mod config_map_env_source; -pub use self::config_map_env_source::{ - ConfigMapEnvSource, -}; +pub use self::config_map_env_source::ConfigMapEnvSource; mod config_map_key_selector; -pub use self::config_map_key_selector::{ - ConfigMapKeySelector, -}; +pub use self::config_map_key_selector::ConfigMapKeySelector; mod config_map_list; -pub use self::config_map_list::{ - ConfigMapList, -}; +pub use self::config_map_list::ConfigMapList; mod config_map_node_config_source; -pub use self::config_map_node_config_source::{ - ConfigMapNodeConfigSource, -}; +pub use self::config_map_node_config_source::ConfigMapNodeConfigSource; mod config_map_projection; -pub use self::config_map_projection::{ - ConfigMapProjection, -}; +pub use self::config_map_projection::ConfigMapProjection; mod config_map_volume_source; -pub use self::config_map_volume_source::{ - ConfigMapVolumeSource, -}; +pub use self::config_map_volume_source::ConfigMapVolumeSource; mod container; -pub use self::container::{ - Container, -}; +pub use self::container::Container; mod container_image; -pub use self::container_image::{ - ContainerImage, -}; +pub use self::container_image::ContainerImage; mod container_port; -pub use self::container_port::{ - ContainerPort, -}; +pub use self::container_port::ContainerPort; mod container_state; -pub use self::container_state::{ - ContainerState, -}; +pub use self::container_state::ContainerState; mod container_state_running; -pub use self::container_state_running::{ - ContainerStateRunning, -}; +pub use self::container_state_running::ContainerStateRunning; mod container_state_terminated; -pub use self::container_state_terminated::{ - ContainerStateTerminated, -}; +pub use self::container_state_terminated::ContainerStateTerminated; mod container_state_waiting; -pub use self::container_state_waiting::{ - ContainerStateWaiting, -}; +pub use self::container_state_waiting::ContainerStateWaiting; mod container_status; -pub use self::container_status::{ - ContainerStatus, -}; +pub use self::container_status::ContainerStatus; mod daemon_endpoint; -pub use self::daemon_endpoint::{ - DaemonEndpoint, -}; +pub use self::daemon_endpoint::DaemonEndpoint; mod downward_api_projection; -pub use self::downward_api_projection::{ - DownwardAPIProjection, -}; +pub use self::downward_api_projection::DownwardAPIProjection; mod downward_api_volume_file; -pub use self::downward_api_volume_file::{ - DownwardAPIVolumeFile, -}; +pub use self::downward_api_volume_file::DownwardAPIVolumeFile; mod downward_api_volume_source; -pub use self::downward_api_volume_source::{ - DownwardAPIVolumeSource, -}; +pub use self::downward_api_volume_source::DownwardAPIVolumeSource; mod empty_dir_volume_source; -pub use self::empty_dir_volume_source::{ - EmptyDirVolumeSource, -}; +pub use self::empty_dir_volume_source::EmptyDirVolumeSource; mod endpoint_address; -pub use self::endpoint_address::{ - EndpointAddress, -}; +pub use self::endpoint_address::EndpointAddress; mod endpoint_port; -pub use self::endpoint_port::{ - EndpointPort, -}; +pub use self::endpoint_port::EndpointPort; mod endpoint_subset; -pub use self::endpoint_subset::{ - EndpointSubset, -}; +pub use self::endpoint_subset::EndpointSubset; mod endpoints; -pub use self::endpoints::{ - Endpoints, - CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse, - DeleteCollectionNamespacedEndpointsResponse, - DeleteNamespacedEndpointsResponse, - ListEndpointsForAllNamespacesResponse, - ListNamespacedEndpointsResponse, - PatchNamespacedEndpointsResponse, - ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse, - ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse, - WatchEndpointsForAllNamespacesResponse, - WatchNamespacedEndpointsResponse, -}; +pub use self::endpoints::Endpoints; +#[cfg(feature = "api")] pub use self::endpoints::{CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::DeleteCollectionNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::DeleteNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::PatchNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::{ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::{ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::WatchEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::WatchNamespacedEndpointsResponse; mod endpoints_list; -pub use self::endpoints_list::{ - EndpointsList, -}; +pub use self::endpoints_list::EndpointsList; mod env_from_source; -pub use self::env_from_source::{ - EnvFromSource, -}; +pub use self::env_from_source::EnvFromSource; mod env_var; -pub use self::env_var::{ - EnvVar, -}; +pub use self::env_var::EnvVar; mod env_var_source; -pub use self::env_var_source::{ - EnvVarSource, -}; +pub use self::env_var_source::EnvVarSource; mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; mod event_source; -pub use self::event_source::{ - EventSource, -}; +pub use self::event_source::EventSource; mod exec_action; -pub use self::exec_action::{ - ExecAction, -}; +pub use self::exec_action::ExecAction; mod fc_volume_source; -pub use self::fc_volume_source::{ - FCVolumeSource, -}; +pub use self::fc_volume_source::FCVolumeSource; mod flex_persistent_volume_source; -pub use self::flex_persistent_volume_source::{ - FlexPersistentVolumeSource, -}; +pub use self::flex_persistent_volume_source::FlexPersistentVolumeSource; mod flex_volume_source; -pub use self::flex_volume_source::{ - FlexVolumeSource, -}; +pub use self::flex_volume_source::FlexVolumeSource; mod flocker_volume_source; -pub use self::flocker_volume_source::{ - FlockerVolumeSource, -}; +pub use self::flocker_volume_source::FlockerVolumeSource; mod gce_persistent_disk_volume_source; -pub use self::gce_persistent_disk_volume_source::{ - GCEPersistentDiskVolumeSource, -}; +pub use self::gce_persistent_disk_volume_source::GCEPersistentDiskVolumeSource; mod git_repo_volume_source; -pub use self::git_repo_volume_source::{ - GitRepoVolumeSource, -}; +pub use self::git_repo_volume_source::GitRepoVolumeSource; mod glusterfs_volume_source; -pub use self::glusterfs_volume_source::{ - GlusterfsVolumeSource, -}; +pub use self::glusterfs_volume_source::GlusterfsVolumeSource; mod http_get_action; -pub use self::http_get_action::{ - HTTPGetAction, -}; +pub use self::http_get_action::HTTPGetAction; mod http_header; -pub use self::http_header::{ - HTTPHeader, -}; +pub use self::http_header::HTTPHeader; mod handler; -pub use self::handler::{ - Handler, -}; +pub use self::handler::Handler; mod host_alias; -pub use self::host_alias::{ - HostAlias, -}; +pub use self::host_alias::HostAlias; mod host_path_volume_source; -pub use self::host_path_volume_source::{ - HostPathVolumeSource, -}; +pub use self::host_path_volume_source::HostPathVolumeSource; mod iscsi_persistent_volume_source; -pub use self::iscsi_persistent_volume_source::{ - ISCSIPersistentVolumeSource, -}; +pub use self::iscsi_persistent_volume_source::ISCSIPersistentVolumeSource; mod iscsi_volume_source; -pub use self::iscsi_volume_source::{ - ISCSIVolumeSource, -}; +pub use self::iscsi_volume_source::ISCSIVolumeSource; mod key_to_path; -pub use self::key_to_path::{ - KeyToPath, -}; +pub use self::key_to_path::KeyToPath; mod lifecycle; -pub use self::lifecycle::{ - Lifecycle, -}; +pub use self::lifecycle::Lifecycle; mod limit_range; -pub use self::limit_range::{ - LimitRange, - CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse, - DeleteCollectionNamespacedLimitRangeResponse, - DeleteNamespacedLimitRangeResponse, - ListLimitRangeForAllNamespacesResponse, - ListNamespacedLimitRangeResponse, - PatchNamespacedLimitRangeResponse, - ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse, - ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse, - WatchLimitRangeForAllNamespacesResponse, - WatchNamespacedLimitRangeResponse, -}; +pub use self::limit_range::LimitRange; +#[cfg(feature = "api")] pub use self::limit_range::{CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::DeleteCollectionNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::DeleteNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::PatchNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::{ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::{ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::WatchLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::WatchNamespacedLimitRangeResponse; mod limit_range_item; -pub use self::limit_range_item::{ - LimitRangeItem, -}; +pub use self::limit_range_item::LimitRangeItem; mod limit_range_list; -pub use self::limit_range_list::{ - LimitRangeList, -}; +pub use self::limit_range_list::LimitRangeList; mod limit_range_spec; -pub use self::limit_range_spec::{ - LimitRangeSpec, -}; +pub use self::limit_range_spec::LimitRangeSpec; mod load_balancer_ingress; -pub use self::load_balancer_ingress::{ - LoadBalancerIngress, -}; +pub use self::load_balancer_ingress::LoadBalancerIngress; mod load_balancer_status; -pub use self::load_balancer_status::{ - LoadBalancerStatus, -}; +pub use self::load_balancer_status::LoadBalancerStatus; mod local_object_reference; -pub use self::local_object_reference::{ - LocalObjectReference, -}; +pub use self::local_object_reference::LocalObjectReference; mod local_volume_source; -pub use self::local_volume_source::{ - LocalVolumeSource, -}; +pub use self::local_volume_source::LocalVolumeSource; mod nfs_volume_source; -pub use self::nfs_volume_source::{ - NFSVolumeSource, -}; +pub use self::nfs_volume_source::NFSVolumeSource; mod namespace; -pub use self::namespace::{ - Namespace, - CreateNamespaceOptional, CreateNamespaceResponse, - DeleteNamespaceResponse, - ListNamespaceResponse, - PatchNamespaceResponse, - PatchNamespaceStatusResponse, - ReadNamespaceOptional, ReadNamespaceResponse, - ReadNamespaceStatusOptional, ReadNamespaceStatusResponse, - ReplaceNamespaceOptional, ReplaceNamespaceResponse, - ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse, - ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse, - WatchNamespaceResponse, -}; +pub use self::namespace::Namespace; +#[cfg(feature = "api")] pub use self::namespace::{CreateNamespaceOptional, CreateNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::DeleteNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::ListNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceStatusResponse; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceOptional, ReadNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceStatusOptional, ReadNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceOptional, ReplaceNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::WatchNamespaceResponse; mod namespace_list; -pub use self::namespace_list::{ - NamespaceList, -}; +pub use self::namespace_list::NamespaceList; mod namespace_spec; -pub use self::namespace_spec::{ - NamespaceSpec, -}; +pub use self::namespace_spec::NamespaceSpec; mod namespace_status; -pub use self::namespace_status::{ - NamespaceStatus, -}; +pub use self::namespace_status::NamespaceStatus; mod node; -pub use self::node::{ - Node, - ConnectDeleteNodeProxyOptional, - ConnectDeleteNodeProxyWithPathOptional, - ConnectGetNodeProxyOptional, - ConnectGetNodeProxyWithPathOptional, - ConnectPatchNodeProxyOptional, - ConnectPatchNodeProxyWithPathOptional, - ConnectPostNodeProxyOptional, - ConnectPostNodeProxyWithPathOptional, - ConnectPutNodeProxyOptional, - ConnectPutNodeProxyWithPathOptional, - CreateNodeOptional, CreateNodeResponse, - DeleteCollectionNodeResponse, - DeleteNodeResponse, - ListNodeResponse, - PatchNodeResponse, - PatchNodeStatusResponse, - ReadNodeOptional, ReadNodeResponse, - ReadNodeStatusOptional, ReadNodeStatusResponse, - ReplaceNodeOptional, ReplaceNodeResponse, - ReplaceNodeStatusOptional, ReplaceNodeStatusResponse, - WatchNodeResponse, -}; +pub use self::node::Node; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::{CreateNodeOptional, CreateNodeResponse}; +#[cfg(feature = "api")] pub use self::node::DeleteCollectionNodeResponse; +#[cfg(feature = "api")] pub use self::node::DeleteNodeResponse; +#[cfg(feature = "api")] pub use self::node::ListNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeStatusResponse; +#[cfg(feature = "api")] pub use self::node::{ReadNodeOptional, ReadNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReadNodeStatusOptional, ReadNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeOptional, ReplaceNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeStatusOptional, ReplaceNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::WatchNodeResponse; mod node_address; -pub use self::node_address::{ - NodeAddress, -}; +pub use self::node_address::NodeAddress; mod node_affinity; -pub use self::node_affinity::{ - NodeAffinity, -}; +pub use self::node_affinity::NodeAffinity; mod node_condition; -pub use self::node_condition::{ - NodeCondition, -}; +pub use self::node_condition::NodeCondition; mod node_config_source; -pub use self::node_config_source::{ - NodeConfigSource, -}; +pub use self::node_config_source::NodeConfigSource; mod node_config_status; -pub use self::node_config_status::{ - NodeConfigStatus, -}; +pub use self::node_config_status::NodeConfigStatus; mod node_daemon_endpoints; -pub use self::node_daemon_endpoints::{ - NodeDaemonEndpoints, -}; +pub use self::node_daemon_endpoints::NodeDaemonEndpoints; mod node_list; -pub use self::node_list::{ - NodeList, -}; +pub use self::node_list::NodeList; mod node_selector; -pub use self::node_selector::{ - NodeSelector, -}; +pub use self::node_selector::NodeSelector; mod node_selector_requirement; -pub use self::node_selector_requirement::{ - NodeSelectorRequirement, -}; +pub use self::node_selector_requirement::NodeSelectorRequirement; mod node_selector_term; -pub use self::node_selector_term::{ - NodeSelectorTerm, -}; +pub use self::node_selector_term::NodeSelectorTerm; mod node_spec; -pub use self::node_spec::{ - NodeSpec, -}; +pub use self::node_spec::NodeSpec; mod node_status; -pub use self::node_status::{ - NodeStatus, -}; +pub use self::node_status::NodeStatus; mod node_system_info; -pub use self::node_system_info::{ - NodeSystemInfo, -}; +pub use self::node_system_info::NodeSystemInfo; mod object_field_selector; -pub use self::object_field_selector::{ - ObjectFieldSelector, -}; +pub use self::object_field_selector::ObjectFieldSelector; mod object_reference; -pub use self::object_reference::{ - ObjectReference, -}; +pub use self::object_reference::ObjectReference; mod persistent_volume; -pub use self::persistent_volume::{ - PersistentVolume, - CreatePersistentVolumeOptional, CreatePersistentVolumeResponse, - DeleteCollectionPersistentVolumeResponse, - DeletePersistentVolumeResponse, - ListPersistentVolumeResponse, - PatchPersistentVolumeResponse, - PatchPersistentVolumeStatusResponse, - ReadPersistentVolumeOptional, ReadPersistentVolumeResponse, - ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse, - ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse, - ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse, - WatchPersistentVolumeResponse, -}; +pub use self::persistent_volume::PersistentVolume; +#[cfg(feature = "api")] pub use self::persistent_volume::{CreatePersistentVolumeOptional, CreatePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::DeleteCollectionPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::DeletePersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::ListPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeOptional, ReadPersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::WatchPersistentVolumeResponse; mod persistent_volume_claim; -pub use self::persistent_volume_claim::{ - PersistentVolumeClaim, - CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse, - DeleteCollectionNamespacedPersistentVolumeClaimResponse, - DeleteNamespacedPersistentVolumeClaimResponse, - ListNamespacedPersistentVolumeClaimResponse, - ListPersistentVolumeClaimForAllNamespacesResponse, - PatchNamespacedPersistentVolumeClaimResponse, - PatchNamespacedPersistentVolumeClaimStatusResponse, - ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse, - ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse, - ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse, - ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse, - WatchNamespacedPersistentVolumeClaimResponse, - WatchPersistentVolumeClaimForAllNamespacesResponse, -}; +pub use self::persistent_volume_claim::PersistentVolumeClaim; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteCollectionNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListPersistentVolumeClaimForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchPersistentVolumeClaimForAllNamespacesResponse; mod persistent_volume_claim_condition; -pub use self::persistent_volume_claim_condition::{ - PersistentVolumeClaimCondition, -}; +pub use self::persistent_volume_claim_condition::PersistentVolumeClaimCondition; mod persistent_volume_claim_list; -pub use self::persistent_volume_claim_list::{ - PersistentVolumeClaimList, -}; +pub use self::persistent_volume_claim_list::PersistentVolumeClaimList; mod persistent_volume_claim_spec; -pub use self::persistent_volume_claim_spec::{ - PersistentVolumeClaimSpec, -}; +pub use self::persistent_volume_claim_spec::PersistentVolumeClaimSpec; mod persistent_volume_claim_status; -pub use self::persistent_volume_claim_status::{ - PersistentVolumeClaimStatus, -}; +pub use self::persistent_volume_claim_status::PersistentVolumeClaimStatus; mod persistent_volume_claim_volume_source; -pub use self::persistent_volume_claim_volume_source::{ - PersistentVolumeClaimVolumeSource, -}; +pub use self::persistent_volume_claim_volume_source::PersistentVolumeClaimVolumeSource; mod persistent_volume_list; -pub use self::persistent_volume_list::{ - PersistentVolumeList, -}; +pub use self::persistent_volume_list::PersistentVolumeList; mod persistent_volume_spec; -pub use self::persistent_volume_spec::{ - PersistentVolumeSpec, -}; +pub use self::persistent_volume_spec::PersistentVolumeSpec; mod persistent_volume_status; -pub use self::persistent_volume_status::{ - PersistentVolumeStatus, -}; +pub use self::persistent_volume_status::PersistentVolumeStatus; mod photon_persistent_disk_volume_source; -pub use self::photon_persistent_disk_volume_source::{ - PhotonPersistentDiskVolumeSource, -}; +pub use self::photon_persistent_disk_volume_source::PhotonPersistentDiskVolumeSource; mod pod; -pub use self::pod::{ - Pod, - ConnectDeleteNamespacedPodProxyOptional, - ConnectDeleteNamespacedPodProxyWithPathOptional, - ConnectGetNamespacedPodAttachOptional, - ConnectGetNamespacedPodExecOptional, - ConnectGetNamespacedPodPortforwardOptional, - ConnectGetNamespacedPodProxyOptional, - ConnectGetNamespacedPodProxyWithPathOptional, - ConnectPatchNamespacedPodProxyOptional, - ConnectPatchNamespacedPodProxyWithPathOptional, - ConnectPostNamespacedPodAttachOptional, - ConnectPostNamespacedPodExecOptional, - ConnectPostNamespacedPodPortforwardOptional, - ConnectPostNamespacedPodProxyOptional, - ConnectPostNamespacedPodProxyWithPathOptional, - ConnectPutNamespacedPodProxyOptional, - ConnectPutNamespacedPodProxyWithPathOptional, - CreateNamespacedPodOptional, CreateNamespacedPodResponse, - DeleteCollectionNamespacedPodResponse, - DeleteNamespacedPodResponse, - ListNamespacedPodResponse, - ListPodForAllNamespacesResponse, - PatchNamespacedPodResponse, - PatchNamespacedPodStatusResponse, - ReadNamespacedPodOptional, ReadNamespacedPodResponse, - ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse, - ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse, - ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse, - ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse, - WatchNamespacedPodResponse, - WatchPodForAllNamespacesResponse, -}; +pub use self::pod::Pod; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::{CreateNamespacedPodOptional, CreateNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::DeleteCollectionNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::DeleteNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListPodForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodStatusResponse; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodOptional, ReadNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::WatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::WatchPodForAllNamespacesResponse; mod pod_affinity; -pub use self::pod_affinity::{ - PodAffinity, -}; +pub use self::pod_affinity::PodAffinity; mod pod_affinity_term; -pub use self::pod_affinity_term::{ - PodAffinityTerm, -}; +pub use self::pod_affinity_term::PodAffinityTerm; mod pod_anti_affinity; -pub use self::pod_anti_affinity::{ - PodAntiAffinity, -}; +pub use self::pod_anti_affinity::PodAntiAffinity; mod pod_condition; -pub use self::pod_condition::{ - PodCondition, -}; +pub use self::pod_condition::PodCondition; mod pod_dns_config; -pub use self::pod_dns_config::{ - PodDNSConfig, -}; +pub use self::pod_dns_config::PodDNSConfig; mod pod_dns_config_option; -pub use self::pod_dns_config_option::{ - PodDNSConfigOption, -}; +pub use self::pod_dns_config_option::PodDNSConfigOption; mod pod_list; -pub use self::pod_list::{ - PodList, -}; +pub use self::pod_list::PodList; mod pod_readiness_gate; -pub use self::pod_readiness_gate::{ - PodReadinessGate, -}; +pub use self::pod_readiness_gate::PodReadinessGate; mod pod_security_context; -pub use self::pod_security_context::{ - PodSecurityContext, -}; +pub use self::pod_security_context::PodSecurityContext; mod pod_spec; -pub use self::pod_spec::{ - PodSpec, -}; +pub use self::pod_spec::PodSpec; mod pod_status; -pub use self::pod_status::{ - PodStatus, -}; +pub use self::pod_status::PodStatus; mod pod_template; -pub use self::pod_template::{ - PodTemplate, - CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse, - DeleteCollectionNamespacedPodTemplateResponse, - DeleteNamespacedPodTemplateResponse, - ListNamespacedPodTemplateResponse, - ListPodTemplateForAllNamespacesResponse, - PatchNamespacedPodTemplateResponse, - ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse, - ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse, - WatchNamespacedPodTemplateResponse, - WatchPodTemplateForAllNamespacesResponse, -}; +pub use self::pod_template::PodTemplate; +#[cfg(feature = "api")] pub use self::pod_template::{CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::DeleteCollectionNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::DeleteNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListPodTemplateForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_template::PatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::{ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::{ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::WatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::WatchPodTemplateForAllNamespacesResponse; mod pod_template_list; -pub use self::pod_template_list::{ - PodTemplateList, -}; +pub use self::pod_template_list::PodTemplateList; mod pod_template_spec; -pub use self::pod_template_spec::{ - PodTemplateSpec, -}; +pub use self::pod_template_spec::PodTemplateSpec; mod portworx_volume_source; -pub use self::portworx_volume_source::{ - PortworxVolumeSource, -}; +pub use self::portworx_volume_source::PortworxVolumeSource; mod preferred_scheduling_term; -pub use self::preferred_scheduling_term::{ - PreferredSchedulingTerm, -}; +pub use self::preferred_scheduling_term::PreferredSchedulingTerm; mod probe; -pub use self::probe::{ - Probe, -}; +pub use self::probe::Probe; mod projected_volume_source; -pub use self::projected_volume_source::{ - ProjectedVolumeSource, -}; +pub use self::projected_volume_source::ProjectedVolumeSource; mod quobyte_volume_source; -pub use self::quobyte_volume_source::{ - QuobyteVolumeSource, -}; +pub use self::quobyte_volume_source::QuobyteVolumeSource; mod rbd_persistent_volume_source; -pub use self::rbd_persistent_volume_source::{ - RBDPersistentVolumeSource, -}; +pub use self::rbd_persistent_volume_source::RBDPersistentVolumeSource; mod rbd_volume_source; -pub use self::rbd_volume_source::{ - RBDVolumeSource, -}; +pub use self::rbd_volume_source::RBDVolumeSource; mod replication_controller; -pub use self::replication_controller::{ - ReplicationController, - CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse, - DeleteCollectionNamespacedReplicationControllerResponse, - DeleteNamespacedReplicationControllerResponse, - ListNamespacedReplicationControllerResponse, - ListReplicationControllerForAllNamespacesResponse, - PatchNamespacedReplicationControllerResponse, - PatchNamespacedReplicationControllerStatusResponse, - ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse, - ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse, - ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse, - ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse, - WatchNamespacedReplicationControllerResponse, - WatchReplicationControllerForAllNamespacesResponse, -}; +pub use self::replication_controller::ReplicationController; +#[cfg(feature = "api")] pub use self::replication_controller::{CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteCollectionNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListReplicationControllerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerStatusResponse; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::WatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::WatchReplicationControllerForAllNamespacesResponse; mod replication_controller_condition; -pub use self::replication_controller_condition::{ - ReplicationControllerCondition, -}; +pub use self::replication_controller_condition::ReplicationControllerCondition; mod replication_controller_list; -pub use self::replication_controller_list::{ - ReplicationControllerList, -}; +pub use self::replication_controller_list::ReplicationControllerList; mod replication_controller_spec; -pub use self::replication_controller_spec::{ - ReplicationControllerSpec, -}; +pub use self::replication_controller_spec::ReplicationControllerSpec; mod replication_controller_status; -pub use self::replication_controller_status::{ - ReplicationControllerStatus, -}; +pub use self::replication_controller_status::ReplicationControllerStatus; mod resource_field_selector; -pub use self::resource_field_selector::{ - ResourceFieldSelector, -}; +pub use self::resource_field_selector::ResourceFieldSelector; mod resource_quota; -pub use self::resource_quota::{ - ResourceQuota, - CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse, - DeleteCollectionNamespacedResourceQuotaResponse, - DeleteNamespacedResourceQuotaResponse, - ListNamespacedResourceQuotaResponse, - ListResourceQuotaForAllNamespacesResponse, - PatchNamespacedResourceQuotaResponse, - PatchNamespacedResourceQuotaStatusResponse, - ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse, - ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse, - ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse, - ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse, - WatchNamespacedResourceQuotaResponse, - WatchResourceQuotaForAllNamespacesResponse, -}; +pub use self::resource_quota::ResourceQuota; +#[cfg(feature = "api")] pub use self::resource_quota::{CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteCollectionNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListResourceQuotaForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaStatusResponse; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::WatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::WatchResourceQuotaForAllNamespacesResponse; mod resource_quota_list; -pub use self::resource_quota_list::{ - ResourceQuotaList, -}; +pub use self::resource_quota_list::ResourceQuotaList; mod resource_quota_spec; -pub use self::resource_quota_spec::{ - ResourceQuotaSpec, -}; +pub use self::resource_quota_spec::ResourceQuotaSpec; mod resource_quota_status; -pub use self::resource_quota_status::{ - ResourceQuotaStatus, -}; +pub use self::resource_quota_status::ResourceQuotaStatus; mod resource_requirements; -pub use self::resource_requirements::{ - ResourceRequirements, -}; +pub use self::resource_requirements::ResourceRequirements; mod se_linux_options; -pub use self::se_linux_options::{ - SELinuxOptions, -}; +pub use self::se_linux_options::SELinuxOptions; mod scale_io_persistent_volume_source; -pub use self::scale_io_persistent_volume_source::{ - ScaleIOPersistentVolumeSource, -}; +pub use self::scale_io_persistent_volume_source::ScaleIOPersistentVolumeSource; mod scale_io_volume_source; -pub use self::scale_io_volume_source::{ - ScaleIOVolumeSource, -}; +pub use self::scale_io_volume_source::ScaleIOVolumeSource; mod scope_selector; -pub use self::scope_selector::{ - ScopeSelector, -}; +pub use self::scope_selector::ScopeSelector; mod scoped_resource_selector_requirement; -pub use self::scoped_resource_selector_requirement::{ - ScopedResourceSelectorRequirement, -}; +pub use self::scoped_resource_selector_requirement::ScopedResourceSelectorRequirement; mod secret; -pub use self::secret::{ - Secret, - CreateNamespacedSecretOptional, CreateNamespacedSecretResponse, - DeleteCollectionNamespacedSecretResponse, - DeleteNamespacedSecretResponse, - ListNamespacedSecretResponse, - ListSecretForAllNamespacesResponse, - PatchNamespacedSecretResponse, - ReadNamespacedSecretOptional, ReadNamespacedSecretResponse, - ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse, - WatchNamespacedSecretResponse, - WatchSecretForAllNamespacesResponse, -}; +pub use self::secret::Secret; +#[cfg(feature = "api")] pub use self::secret::{CreateNamespacedSecretOptional, CreateNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::DeleteCollectionNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::DeleteNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListSecretForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::secret::PatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::{ReadNamespacedSecretOptional, ReadNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::{ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::WatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::WatchSecretForAllNamespacesResponse; mod secret_env_source; -pub use self::secret_env_source::{ - SecretEnvSource, -}; +pub use self::secret_env_source::SecretEnvSource; mod secret_key_selector; -pub use self::secret_key_selector::{ - SecretKeySelector, -}; +pub use self::secret_key_selector::SecretKeySelector; mod secret_list; -pub use self::secret_list::{ - SecretList, -}; +pub use self::secret_list::SecretList; mod secret_projection; -pub use self::secret_projection::{ - SecretProjection, -}; +pub use self::secret_projection::SecretProjection; mod secret_reference; -pub use self::secret_reference::{ - SecretReference, -}; +pub use self::secret_reference::SecretReference; mod secret_volume_source; -pub use self::secret_volume_source::{ - SecretVolumeSource, -}; +pub use self::secret_volume_source::SecretVolumeSource; mod security_context; -pub use self::security_context::{ - SecurityContext, -}; +pub use self::security_context::SecurityContext; mod service; -pub use self::service::{ - Service, - ConnectDeleteNamespacedServiceProxyOptional, - ConnectDeleteNamespacedServiceProxyWithPathOptional, - ConnectGetNamespacedServiceProxyOptional, - ConnectGetNamespacedServiceProxyWithPathOptional, - ConnectPatchNamespacedServiceProxyOptional, - ConnectPatchNamespacedServiceProxyWithPathOptional, - ConnectPostNamespacedServiceProxyOptional, - ConnectPostNamespacedServiceProxyWithPathOptional, - ConnectPutNamespacedServiceProxyOptional, - ConnectPutNamespacedServiceProxyWithPathOptional, - CreateNamespacedServiceOptional, CreateNamespacedServiceResponse, - DeleteNamespacedServiceResponse, - ListNamespacedServiceResponse, - ListServiceForAllNamespacesResponse, - PatchNamespacedServiceResponse, - PatchNamespacedServiceStatusResponse, - ReadNamespacedServiceOptional, ReadNamespacedServiceResponse, - ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse, - ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse, - ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse, - WatchNamespacedServiceResponse, - WatchServiceForAllNamespacesResponse, -}; +pub use self::service::Service; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::{CreateNamespacedServiceOptional, CreateNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::DeleteNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListServiceForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceStatusResponse; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceOptional, ReadNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::WatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::WatchServiceForAllNamespacesResponse; mod service_account; -pub use self::service_account::{ - ServiceAccount, - CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse, - DeleteCollectionNamespacedServiceAccountResponse, - DeleteNamespacedServiceAccountResponse, - ListNamespacedServiceAccountResponse, - ListServiceAccountForAllNamespacesResponse, - PatchNamespacedServiceAccountResponse, - ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse, - ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse, - WatchNamespacedServiceAccountResponse, - WatchServiceAccountForAllNamespacesResponse, -}; +pub use self::service_account::ServiceAccount; +#[cfg(feature = "api")] pub use self::service_account::{CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::DeleteCollectionNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::DeleteNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListServiceAccountForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service_account::PatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::{ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::{ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::WatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::WatchServiceAccountForAllNamespacesResponse; mod service_account_list; -pub use self::service_account_list::{ - ServiceAccountList, -}; +pub use self::service_account_list::ServiceAccountList; mod service_account_token_projection; -pub use self::service_account_token_projection::{ - ServiceAccountTokenProjection, -}; +pub use self::service_account_token_projection::ServiceAccountTokenProjection; mod service_list; -pub use self::service_list::{ - ServiceList, -}; +pub use self::service_list::ServiceList; mod service_port; -pub use self::service_port::{ - ServicePort, -}; +pub use self::service_port::ServicePort; mod service_spec; -pub use self::service_spec::{ - ServiceSpec, -}; +pub use self::service_spec::ServiceSpec; mod service_status; -pub use self::service_status::{ - ServiceStatus, -}; +pub use self::service_status::ServiceStatus; mod session_affinity_config; -pub use self::session_affinity_config::{ - SessionAffinityConfig, -}; +pub use self::session_affinity_config::SessionAffinityConfig; mod storage_os_persistent_volume_source; -pub use self::storage_os_persistent_volume_source::{ - StorageOSPersistentVolumeSource, -}; +pub use self::storage_os_persistent_volume_source::StorageOSPersistentVolumeSource; mod storage_os_volume_source; -pub use self::storage_os_volume_source::{ - StorageOSVolumeSource, -}; +pub use self::storage_os_volume_source::StorageOSVolumeSource; mod sysctl; -pub use self::sysctl::{ - Sysctl, -}; +pub use self::sysctl::Sysctl; mod tcp_socket_action; -pub use self::tcp_socket_action::{ - TCPSocketAction, -}; +pub use self::tcp_socket_action::TCPSocketAction; mod taint; -pub use self::taint::{ - Taint, -}; +pub use self::taint::Taint; mod toleration; -pub use self::toleration::{ - Toleration, -}; +pub use self::toleration::Toleration; mod topology_selector_label_requirement; -pub use self::topology_selector_label_requirement::{ - TopologySelectorLabelRequirement, -}; +pub use self::topology_selector_label_requirement::TopologySelectorLabelRequirement; mod topology_selector_term; -pub use self::topology_selector_term::{ - TopologySelectorTerm, -}; +pub use self::topology_selector_term::TopologySelectorTerm; mod volume; -pub use self::volume::{ - Volume, -}; +pub use self::volume::Volume; mod volume_device; -pub use self::volume_device::{ - VolumeDevice, -}; +pub use self::volume_device::VolumeDevice; mod volume_mount; -pub use self::volume_mount::{ - VolumeMount, -}; +pub use self::volume_mount::VolumeMount; mod volume_node_affinity; -pub use self::volume_node_affinity::{ - VolumeNodeAffinity, -}; +pub use self::volume_node_affinity::VolumeNodeAffinity; mod volume_projection; -pub use self::volume_projection::{ - VolumeProjection, -}; +pub use self::volume_projection::VolumeProjection; mod vsphere_virtual_disk_volume_source; -pub use self::vsphere_virtual_disk_volume_source::{ - VsphereVirtualDiskVolumeSource, -}; +pub use self::vsphere_virtual_disk_volume_source::VsphereVirtualDiskVolumeSource; mod weighted_pod_affinity_term; -pub use self::weighted_pod_affinity_term::{ - WeightedPodAffinityTerm, -}; +pub use self::weighted_pod_affinity_term::WeightedPodAffinityTerm; diff --git a/src/v1_11/api/core/v1/namespace.rs b/src/v1_11/api/core/v1/namespace.rs index 9358a44fdc..562a694c21 100644 --- a/src/v1_11/api/core/v1/namespace.rs +++ b/src/v1_11/api/core/v1/namespace.rs @@ -29,6 +29,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespace( body: &crate::v1_11::api::core::v1::Namespace, optional: CreateNamespaceOptional<'_>, @@ -54,6 +55,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespaceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespaceResponse { Ok(crate::v1_11::api::core::v1::Namespace), @@ -69,6 +72,7 @@ pub enum CreateNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespace( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::delete_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespaceResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespace( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -230,12 +238,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::list_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespaceResponse { Ok(crate::v1_11::api::core::v1::NamespaceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -283,6 +293,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -310,12 +321,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceResponse { Ok(crate::v1_11::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -363,6 +376,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace_status( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -390,12 +404,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceStatusResponse { Ok(crate::v1_11::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -441,6 +457,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace( name: &str, optional: ReadNamespaceOptional<'_>, @@ -475,6 +492,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -486,12 +504,14 @@ pub struct ReadNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceResponse { Ok(crate::v1_11::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -537,6 +557,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace_status( name: &str, optional: ReadNamespaceStatusOptional<'_>, @@ -563,6 +584,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -570,12 +592,14 @@ pub struct ReadNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceStatusResponse { Ok(crate::v1_11::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -623,6 +647,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace( name: &str, body: &crate::v1_11::api::core::v1::Namespace, @@ -651,6 +676,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -658,6 +684,7 @@ pub struct ReplaceNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceResponse { Ok(crate::v1_11::api::core::v1::Namespace), @@ -665,6 +692,7 @@ pub enum ReplaceNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +748,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_finalize( name: &str, body: &crate::v1_11::api::core::v1::Namespace, @@ -748,6 +777,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceFinalizeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,6 +785,7 @@ pub struct ReplaceNamespaceFinalizeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceFinalizeResponse { Ok(crate::v1_11::api::core::v1::Namespace), @@ -762,6 +793,7 @@ pub enum ReplaceNamespaceFinalizeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceFinalizeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -817,6 +849,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_status( name: &str, body: &crate::v1_11::api::core::v1::Namespace, @@ -845,6 +878,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -852,6 +886,7 @@ pub struct ReplaceNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceStatusResponse { Ok(crate::v1_11::api::core::v1::Namespace), @@ -859,6 +894,7 @@ pub enum ReplaceNamespaceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -910,6 +946,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespace( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -928,12 +965,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::watch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespaceResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/node.rs b/src/v1_11/api/core/v1/node.rs index a7ef168b27..61c03da0cb 100644 --- a/src/v1_11/api/core/v1/node.rs +++ b/src/v1_11/api/core/v1/node.rs @@ -29,6 +29,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy( name: &str, optional: ConnectDeleteNodeProxyOptional<'_>, @@ -52,6 +53,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -76,6 +78,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy_with_path( name: &str, path: &str, @@ -101,6 +104,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -121,6 +125,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy( name: &str, optional: ConnectGetNodeProxyOptional<'_>, @@ -144,6 +149,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -168,6 +174,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy_with_path( name: &str, path: &str, @@ -193,6 +200,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -213,6 +221,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy( name: &str, optional: ConnectPatchNodeProxyOptional<'_>, @@ -236,6 +245,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -260,6 +270,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy_with_path( name: &str, path: &str, @@ -285,6 +296,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -305,6 +317,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy( name: &str, optional: ConnectPostNodeProxyOptional<'_>, @@ -328,6 +341,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -352,6 +366,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy_with_path( name: &str, path: &str, @@ -377,6 +392,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -397,6 +413,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy( name: &str, optional: ConnectPutNodeProxyOptional<'_>, @@ -420,6 +437,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -444,6 +462,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy_with_path( name: &str, path: &str, @@ -469,6 +488,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -489,6 +509,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_node( body: &crate::v1_11::api::core::v1::Node, optional: CreateNodeOptional<'_>, @@ -514,6 +535,7 @@ impl Node { } /// Optional parameters of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNodeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -521,6 +543,7 @@ pub struct CreateNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNodeResponse { Ok(crate::v1_11::api::core::v1::Node), @@ -529,6 +552,7 @@ pub enum CreateNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -590,6 +614,7 @@ impl Node { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_node( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -610,6 +635,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_collection_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNodeResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -617,6 +643,7 @@ pub enum DeleteCollectionNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +702,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_node( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -694,6 +722,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNodeResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -701,6 +730,7 @@ pub enum DeleteNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -757,6 +787,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_node( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -775,12 +806,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::list_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNodeResponse { Ok(crate::v1_11::api::core::v1::NodeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -828,6 +861,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -855,12 +889,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeResponse { Ok(crate::v1_11::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -908,6 +944,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node_status( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -935,12 +972,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeStatusResponse { Ok(crate::v1_11::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -986,6 +1025,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node( name: &str, optional: ReadNodeOptional<'_>, @@ -1020,6 +1060,7 @@ impl Node { } /// Optional parameters of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1031,12 +1072,14 @@ pub struct ReadNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeResponse { Ok(crate::v1_11::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1082,6 +1125,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node_status( name: &str, optional: ReadNodeStatusOptional<'_>, @@ -1108,6 +1152,7 @@ impl Node { } /// Optional parameters of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1115,12 +1160,14 @@ pub struct ReadNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeStatusResponse { Ok(crate::v1_11::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1168,6 +1215,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node( name: &str, body: &crate::v1_11::api::core::v1::Node, @@ -1196,6 +1244,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1203,6 +1252,7 @@ pub struct ReplaceNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeResponse { Ok(crate::v1_11::api::core::v1::Node), @@ -1210,6 +1260,7 @@ pub enum ReplaceNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1265,6 +1316,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node_status( name: &str, body: &crate::v1_11::api::core::v1::Node, @@ -1293,6 +1345,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1300,6 +1353,7 @@ pub struct ReplaceNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeStatusResponse { Ok(crate::v1_11::api::core::v1::Node), @@ -1307,6 +1361,7 @@ pub enum ReplaceNodeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1358,6 +1413,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_node( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1376,12 +1432,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::watch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNodeResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/persistent_volume.rs b/src/v1_11/api/core/v1/persistent_volume.rs index 3390629577..a315441df7 100644 --- a/src/v1_11/api/core/v1/persistent_volume.rs +++ b/src/v1_11/api/core/v1/persistent_volume.rs @@ -29,6 +29,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_persistent_volume( body: &crate::v1_11::api::core::v1::PersistentVolume, optional: CreatePersistentVolumeOptional<'_>, @@ -54,6 +55,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePersistentVolumeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreatePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePersistentVolumeResponse { Ok(crate::v1_11::api::core::v1::PersistentVolume), @@ -69,6 +72,7 @@ pub enum CreatePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl PersistentVolume { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_persistent_volume( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -150,6 +155,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_collection_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPersistentVolumeResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -157,6 +163,7 @@ pub enum DeleteCollectionPersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_persistent_volume( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -234,6 +242,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePersistentVolumeResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeletePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::list_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeResponse { Ok(crate::v1_11::api::core::v1::PersistentVolumeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeResponse { Ok(crate::v1_11::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume_status( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -475,12 +492,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeStatusResponse { Ok(crate::v1_11::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -526,6 +545,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume( name: &str, optional: ReadPersistentVolumeOptional<'_>, @@ -560,6 +580,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -571,12 +592,14 @@ pub struct ReadPersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeResponse { Ok(crate::v1_11::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -622,6 +645,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume_status( name: &str, optional: ReadPersistentVolumeStatusOptional<'_>, @@ -648,6 +672,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -655,12 +680,14 @@ pub struct ReadPersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeStatusResponse { Ok(crate::v1_11::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -708,6 +735,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume( name: &str, body: &crate::v1_11::api::core::v1::PersistentVolume, @@ -736,6 +764,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -743,6 +772,7 @@ pub struct ReplacePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeResponse { Ok(crate::v1_11::api::core::v1::PersistentVolume), @@ -750,6 +780,7 @@ pub enum ReplacePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -805,6 +836,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume_status( name: &str, body: &crate::v1_11::api::core::v1::PersistentVolume, @@ -833,6 +865,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -840,6 +873,7 @@ pub struct ReplacePersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeStatusResponse { Ok(crate::v1_11::api::core::v1::PersistentVolume), @@ -847,6 +881,7 @@ pub enum ReplacePersistentVolumeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -898,6 +933,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -916,12 +952,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::watch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/persistent_volume_claim.rs b/src/v1_11/api/core/v1/persistent_volume_claim.rs index 47c8981c75..9e526748f1 100644 --- a/src/v1_11/api/core/v1/persistent_volume_claim.rs +++ b/src/v1_11/api/core/v1/persistent_volume_claim.rs @@ -33,6 +33,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_persistent_volume_claim( namespace: &str, body: &crate::v1_11::api::core::v1::PersistentVolumeClaim, @@ -61,6 +62,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_11::api::core::v1::PersistentVolumeClaim), @@ -76,6 +79,7 @@ pub enum CreateNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl PersistentVolumeClaim { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_persistent_volume_claim( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_collection_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -342,12 +353,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_11::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume_claim_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_11::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_11::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_11::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_11::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_11::api::core::v1::PersistentVolumeClaim), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_11::api::core::v1::PersistentVolumeClaim), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume_claim_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/pod.rs b/src/v1_11/api/core/v1/pod.rs index 33a409432b..d8105b954c 100644 --- a/src/v1_11/api/core/v1/pod.rs +++ b/src/v1_11/api/core/v1/pod.rs @@ -33,6 +33,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -86,6 +88,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -137,6 +141,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_attach( name: &str, namespace: &str, @@ -178,6 +183,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -210,6 +216,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_exec( name: &str, namespace: &str, @@ -255,6 +262,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -289,6 +297,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_portforward( name: &str, namespace: &str, @@ -314,6 +323,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -338,6 +348,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy( name: &str, namespace: &str, @@ -363,6 +374,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -391,6 +403,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -418,6 +431,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -442,6 +456,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy( name: &str, namespace: &str, @@ -467,6 +482,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -495,6 +511,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -522,6 +539,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -546,6 +564,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_attach( name: &str, namespace: &str, @@ -587,6 +606,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -619,6 +639,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_exec( name: &str, namespace: &str, @@ -664,6 +685,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -698,6 +720,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_portforward( name: &str, namespace: &str, @@ -723,6 +746,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -747,6 +771,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy( name: &str, namespace: &str, @@ -772,6 +797,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -800,6 +826,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -827,6 +854,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -851,6 +879,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy( name: &str, namespace: &str, @@ -876,6 +905,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -904,6 +934,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -931,6 +962,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -955,6 +987,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod( namespace: &str, body: &crate::v1_11::api::core::v1::Pod, @@ -983,6 +1016,7 @@ impl Pod { } /// Optional parameters of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodOptional<'a> { /// If 'true', then the output is pretty printed. @@ -990,6 +1024,7 @@ pub struct CreateNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodResponse { Ok(crate::v1_11::api::core::v1::Pod), @@ -998,6 +1033,7 @@ pub enum CreateNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1063,6 +1099,7 @@ impl Pod { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -1086,6 +1123,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_collection_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -1093,6 +1131,7 @@ pub enum DeleteCollectionNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1155,6 +1194,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod( name: &str, namespace: &str, @@ -1176,6 +1216,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -1183,6 +1224,7 @@ pub enum DeleteNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1243,6 +1285,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -1264,12 +1307,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodResponse { Ok(crate::v1_11::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1313,6 +1358,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1331,12 +1377,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1388,6 +1436,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod( name: &str, namespace: &str, @@ -1417,12 +1466,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodResponse { Ok(crate::v1_11::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1474,6 +1525,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_status( name: &str, namespace: &str, @@ -1503,12 +1555,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodStatusResponse { Ok(crate::v1_11::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1558,6 +1612,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod( name: &str, namespace: &str, @@ -1594,6 +1649,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1605,12 +1661,14 @@ pub struct ReadNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodResponse { Ok(crate::v1_11::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1660,6 +1718,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_log( name: &str, namespace: &str, @@ -1716,6 +1775,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodLogOptional<'a> { /// The container for which to stream logs. Defaults to only container if there is one container in the pod. @@ -1737,12 +1797,14 @@ pub struct ReadNamespacedPodLogOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodLogResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodLogResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1802,6 +1864,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_status( name: &str, namespace: &str, @@ -1830,6 +1893,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1837,12 +1901,14 @@ pub struct ReadNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodStatusResponse { Ok(crate::v1_11::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1894,6 +1960,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod( name: &str, namespace: &str, @@ -1924,6 +1991,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1931,6 +1999,7 @@ pub struct ReplaceNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodResponse { Ok(crate::v1_11::api::core::v1::Pod), @@ -1938,6 +2007,7 @@ pub enum ReplaceNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1997,6 +2067,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_status( name: &str, namespace: &str, @@ -2027,6 +2098,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2034,6 +2106,7 @@ pub struct ReplaceNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodStatusResponse { Ok(crate::v1_11::api::core::v1::Pod), @@ -2041,6 +2114,7 @@ pub enum ReplaceNamespacedPodStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2096,6 +2170,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -2117,12 +2192,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2168,6 +2245,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2186,12 +2264,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/pod_template.rs b/src/v1_11/api/core/v1/pod_template.rs index 0d332cde01..fe8bf08dd3 100644 --- a/src/v1_11/api/core/v1/pod_template.rs +++ b/src/v1_11/api/core/v1/pod_template.rs @@ -30,6 +30,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_template( namespace: &str, body: &crate::v1_11::api::core::v1::PodTemplate, @@ -58,6 +59,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodTemplateOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodTemplateResponse { Ok(crate::v1_11::api::core::v1::PodTemplate), @@ -73,6 +76,7 @@ pub enum CreateNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl PodTemplate { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_template( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_collection_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodTemplateResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_template( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodTemplateResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_template( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -339,12 +350,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodTemplateResponse { Ok(crate::v1_11::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_template_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodTemplateForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_template( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::patch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodTemplateResponse { Ok(crate::v1_11::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_template( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodTemplateOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodTemplateResponse { Ok(crate::v1_11::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_template( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodTemplateOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodTemplateResponse { Ok(crate::v1_11::api::core::v1::PodTemplate), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -750,6 +777,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_template( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -771,12 +799,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodTemplateResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_template_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -840,12 +871,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodTemplateForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/replication_controller.rs b/src/v1_11/api/core/v1/replication_controller.rs index 6b4862fef8..8fbc2961fe 100644 --- a/src/v1_11/api/core/v1/replication_controller.rs +++ b/src/v1_11/api/core/v1/replication_controller.rs @@ -33,6 +33,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replication_controller( namespace: &str, body: &crate::v1_11::api::core::v1::ReplicationController, @@ -61,6 +62,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicationControllerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicationControllerResponse { Ok(crate::v1_11::api::core::v1::ReplicationController), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicationController { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replication_controller( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_collection_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicationControllerResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replication_controller( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicationControllerResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replication_controller( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicationControllerResponse { Ok(crate::v1_11::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replication_controller_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicationControllerForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerResponse { Ok(crate::v1_11::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerStatusResponse { Ok(crate::v1_11::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerResponse { Ok(crate::v1_11::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerStatusResponse { Ok(crate::v1_11::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerResponse { Ok(crate::v1_11::api::core::v1::ReplicationController), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerStatusResponse { Ok(crate::v1_11::api::core::v1::ReplicationController), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicationControllerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replication_controller( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicationControllerResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replication_controller_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicationControllerForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/resource_quota.rs b/src/v1_11/api/core/v1/resource_quota.rs index 686e7a91b9..e66047616b 100644 --- a/src/v1_11/api/core/v1/resource_quota.rs +++ b/src/v1_11/api/core/v1/resource_quota.rs @@ -33,6 +33,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_resource_quota( namespace: &str, body: &crate::v1_11::api::core::v1::ResourceQuota, @@ -61,6 +62,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedResourceQuotaOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedResourceQuotaResponse { Ok(crate::v1_11::api::core::v1::ResourceQuota), @@ -76,6 +79,7 @@ pub enum CreateNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ResourceQuota { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_resource_quota( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_collection_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedResourceQuotaResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_resource_quota( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedResourceQuotaResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_resource_quota( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedResourceQuotaResponse { Ok(crate::v1_11::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_resource_quota_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListResourceQuotaForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaResponse { Ok(crate::v1_11::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaStatusResponse { Ok(crate::v1_11::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaResponse { Ok(crate::v1_11::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaStatusResponse { Ok(crate::v1_11::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaResponse { Ok(crate::v1_11::api::core::v1::ResourceQuota), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaStatusResponse { Ok(crate::v1_11::api::core::v1::ResourceQuota), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedResourceQuotaStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_resource_quota( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedResourceQuotaResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_resource_quota_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchResourceQuotaForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/secret.rs b/src/v1_11/api/core/v1/secret.rs index fc125b6315..67cf8f2d98 100644 --- a/src/v1_11/api/core/v1/secret.rs +++ b/src/v1_11/api/core/v1/secret.rs @@ -36,6 +36,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_secret( namespace: &str, body: &crate::v1_11::api::core::v1::Secret, @@ -64,6 +65,7 @@ impl Secret { } /// Optional parameters of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedSecretOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,6 +73,7 @@ pub struct CreateNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedSecretResponse { Ok(crate::v1_11::api::core::v1::Secret), @@ -79,6 +82,7 @@ pub enum CreateNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl Secret { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_secret( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -167,6 +172,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_collection_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedSecretResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -174,6 +180,7 @@ pub enum DeleteCollectionNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -236,6 +243,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_secret( name: &str, namespace: &str, @@ -257,6 +265,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedSecretResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -264,6 +273,7 @@ pub enum DeleteNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -324,6 +334,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_secret( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -345,12 +356,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedSecretResponse { Ok(crate::v1_11::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -394,6 +407,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_secret_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -412,12 +426,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListSecretForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_secret( name: &str, namespace: &str, @@ -498,12 +515,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::patch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedSecretResponse { Ok(crate::v1_11::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +572,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_secret( name: &str, namespace: &str, @@ -589,6 +609,7 @@ impl Secret { } /// Optional parameters of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedSecretOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -600,12 +621,14 @@ pub struct ReadNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedSecretResponse { Ok(crate::v1_11::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +680,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_secret( name: &str, namespace: &str, @@ -687,6 +711,7 @@ impl Secret { } /// Optional parameters of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedSecretOptional<'a> { /// If 'true', then the output is pretty printed. @@ -694,6 +719,7 @@ pub struct ReplaceNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedSecretResponse { Ok(crate::v1_11::api::core::v1::Secret), @@ -701,6 +727,7 @@ pub enum ReplaceNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -756,6 +783,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_secret( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -777,12 +805,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedSecretResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -828,6 +858,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_secret_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -846,12 +877,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchSecretForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/service.rs b/src/v1_11/api/core/v1/service.rs index f20f301880..a8db85e38b 100644 --- a/src/v1_11/api/core/v1/service.rs +++ b/src/v1_11/api/core/v1/service.rs @@ -33,6 +33,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -86,6 +88,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -137,6 +141,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy( name: &str, namespace: &str, @@ -162,6 +167,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -190,6 +196,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -217,6 +224,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -241,6 +249,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy( name: &str, namespace: &str, @@ -266,6 +275,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -294,6 +304,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -321,6 +332,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -345,6 +357,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy( name: &str, namespace: &str, @@ -370,6 +383,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -398,6 +412,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -425,6 +440,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -449,6 +465,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy( name: &str, namespace: &str, @@ -474,6 +491,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -502,6 +520,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -529,6 +548,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -553,6 +573,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service( namespace: &str, body: &crate::v1_11::api::core::v1::Service, @@ -581,6 +602,7 @@ impl Service { } /// Optional parameters of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -588,6 +610,7 @@ pub struct CreateNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceResponse { Ok(crate::v1_11::api::core::v1::Service), @@ -596,6 +619,7 @@ pub enum CreateNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service( name: &str, namespace: &str, @@ -682,6 +707,7 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -689,6 +715,7 @@ pub enum DeleteNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -770,12 +798,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceResponse { Ok(crate::v1_11::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -819,6 +849,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -837,12 +868,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -894,6 +927,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service( name: &str, namespace: &str, @@ -923,12 +957,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceResponse { Ok(crate::v1_11::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -980,6 +1016,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_status( name: &str, namespace: &str, @@ -1009,12 +1046,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceStatusResponse { Ok(crate::v1_11::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1064,6 +1103,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service( name: &str, namespace: &str, @@ -1100,6 +1140,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1111,12 +1152,14 @@ pub struct ReadNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceResponse { Ok(crate::v1_11::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1166,6 +1209,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_status( name: &str, namespace: &str, @@ -1194,6 +1238,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1201,12 +1246,14 @@ pub struct ReadNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceStatusResponse { Ok(crate::v1_11::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1258,6 +1305,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service( name: &str, namespace: &str, @@ -1288,6 +1336,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1295,6 +1344,7 @@ pub struct ReplaceNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceResponse { Ok(crate::v1_11::api::core::v1::Service), @@ -1302,6 +1352,7 @@ pub enum ReplaceNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1361,6 +1412,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_status( name: &str, namespace: &str, @@ -1391,6 +1443,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1398,6 +1451,7 @@ pub struct ReplaceNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceStatusResponse { Ok(crate::v1_11::api::core::v1::Service), @@ -1405,6 +1459,7 @@ pub enum ReplaceNamespacedServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1460,6 +1515,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1481,12 +1537,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1532,6 +1590,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1550,12 +1609,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/core/v1/service_account.rs b/src/v1_11/api/core/v1/service_account.rs index 1d07e9a40e..75854ca71e 100644 --- a/src/v1_11/api/core/v1/service_account.rs +++ b/src/v1_11/api/core/v1/service_account.rs @@ -36,6 +36,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service_account( namespace: &str, body: &crate::v1_11::api::core::v1::ServiceAccount, @@ -64,6 +65,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceAccountOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,6 +73,7 @@ pub struct CreateNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceAccountResponse { Ok(crate::v1_11::api::core::v1::ServiceAccount), @@ -79,6 +82,7 @@ pub enum CreateNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl ServiceAccount { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_service_account( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -167,6 +172,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_collection_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedServiceAccountResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -174,6 +180,7 @@ pub enum DeleteCollectionNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -236,6 +243,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service_account( name: &str, namespace: &str, @@ -257,6 +265,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceAccountResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -264,6 +273,7 @@ pub enum DeleteNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -324,6 +334,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service_account( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -345,12 +356,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceAccountResponse { Ok(crate::v1_11::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -394,6 +407,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_account_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -412,12 +426,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceAccountForAllNamespacesResponse { Ok(crate::v1_11::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_account( name: &str, namespace: &str, @@ -498,12 +515,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::patch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceAccountResponse { Ok(crate::v1_11::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +572,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_account( name: &str, namespace: &str, @@ -589,6 +609,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceAccountOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -600,12 +621,14 @@ pub struct ReadNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceAccountResponse { Ok(crate::v1_11::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +680,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_account( name: &str, namespace: &str, @@ -687,6 +711,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceAccountOptional<'a> { /// If 'true', then the output is pretty printed. @@ -694,6 +719,7 @@ pub struct ReplaceNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceAccountResponse { Ok(crate::v1_11::api::core::v1::ServiceAccount), @@ -701,6 +727,7 @@ pub enum ReplaceNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -756,6 +783,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service_account( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -777,12 +805,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceAccountResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -828,6 +858,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_account_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -846,12 +877,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceAccountForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/events/v1beta1/event.rs b/src/v1_11/api/events/v1beta1/event.rs index 2d35ecf633..65fff29daa 100644 --- a/src/v1_11/api/events/v1beta1/event.rs +++ b/src/v1_11/api/events/v1beta1/event.rs @@ -68,6 +68,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_11::api::events::v1beta1::Event, @@ -96,6 +97,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -103,6 +105,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_11::api::events::v1beta1::Event), @@ -111,6 +114,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -176,6 +180,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -199,6 +204,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -206,6 +212,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -268,6 +275,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -289,6 +297,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -296,6 +305,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -352,6 +362,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -370,12 +381,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_11::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -423,6 +436,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -444,12 +458,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_11::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -501,6 +517,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -530,12 +547,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_11::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -585,6 +604,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -621,6 +641,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -632,12 +653,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_11::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -689,6 +712,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -719,6 +743,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -726,6 +751,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_11::api::events::v1beta1::Event), @@ -733,6 +759,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -784,6 +811,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -802,12 +830,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -857,6 +887,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -878,12 +909,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/events/v1beta1/mod.rs b/src/v1_11/api/events/v1beta1/mod.rs index 34d0b5bf3a..0029a47de6 100644 --- a/src/v1_11/api/events/v1beta1/mod.rs +++ b/src/v1_11/api/events/v1beta1/mod.rs @@ -1,25 +1,19 @@ mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; diff --git a/src/v1_11/api/extensions/v1beta1/daemon_set.rs b/src/v1_11/api/extensions/v1beta1/daemon_set.rs index 3946eec591..37ff810f6c 100644 --- a/src/v1_11/api/extensions/v1beta1/daemon_set.rs +++ b/src/v1_11/api/extensions/v1beta1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_11::api::extensions::v1beta1::DaemonSet, @@ -61,6 +62,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_11::api::extensions::v1beta1::DaemonSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_11::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_11::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_11::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_11::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_11::api::extensions::v1beta1::DaemonSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::DaemonSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/extensions/v1beta1/deployment.rs b/src/v1_11/api/extensions/v1beta1/deployment.rs index b48187eedf..09c33f254c 100644 --- a/src/v1_11/api/extensions/v1beta1/deployment.rs +++ b/src/v1_11/api/extensions/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_11::api::extensions::v1beta1::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_11::api::extensions::v1beta1::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_11::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_11::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_11::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_11::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_11::api::extensions::v1beta1::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/extensions/v1beta1/deployment_rollback.rs b/src/v1_11/api/extensions/v1beta1/deployment_rollback.rs index 5996166e75..5395d81b94 100644 --- a/src/v1_11/api/extensions/v1beta1/deployment_rollback.rs +++ b/src/v1_11/api/extensions/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -67,6 +68,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// If 'true', then the output is pretty printed. @@ -74,6 +76,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_11::api::extensions::v1beta1::DeploymentRollback), @@ -82,6 +85,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/extensions/v1beta1/ingress.rs b/src/v1_11/api/extensions/v1beta1/ingress.rs index 1e296735cd..275e43a6d6 100644 --- a/src/v1_11/api/extensions/v1beta1/ingress.rs +++ b/src/v1_11/api/extensions/v1beta1/ingress.rs @@ -33,6 +33,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_ingress( namespace: &str, body: &crate::v1_11::api::extensions::v1beta1::Ingress, @@ -61,6 +62,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedIngressOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedIngressResponse { Ok(crate::v1_11::api::extensions::v1beta1::Ingress), @@ -76,6 +79,7 @@ pub enum CreateNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Ingress { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_ingress( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_collection_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedIngressResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_ingress( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedIngressResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_ingress_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListIngressForAllNamespacesResponse { Ok(crate::v1_11::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_ingress( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedIngressResponse { Ok(crate::v1_11::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressResponse { Ok(crate::v1_11::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressResponse { Ok(crate::v1_11::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressResponse { Ok(crate::v1_11::api::extensions::v1beta1::Ingress), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::Ingress), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedIngressStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_ingress_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchIngressForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_ingress( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedIngressResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/extensions/v1beta1/mod.rs b/src/v1_11/api/extensions/v1beta1/mod.rs index 2ed08add27..d6fdd8c7fa 100644 --- a/src/v1_11/api/extensions/v1beta1/mod.rs +++ b/src/v1_11/api/extensions/v1beta1/mod.rs @@ -1,340 +1,236 @@ mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod http_ingress_path; -pub use self::http_ingress_path::{ - HTTPIngressPath, -}; +pub use self::http_ingress_path::HTTPIngressPath; mod http_ingress_rule_value; -pub use self::http_ingress_rule_value::{ - HTTPIngressRuleValue, -}; +pub use self::http_ingress_rule_value::HTTPIngressRuleValue; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod ingress; -pub use self::ingress::{ - Ingress, - CreateNamespacedIngressOptional, CreateNamespacedIngressResponse, - DeleteCollectionNamespacedIngressResponse, - DeleteNamespacedIngressResponse, - ListIngressForAllNamespacesResponse, - ListNamespacedIngressResponse, - PatchNamespacedIngressResponse, - PatchNamespacedIngressStatusResponse, - ReadNamespacedIngressOptional, ReadNamespacedIngressResponse, - ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse, - ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse, - ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse, - WatchIngressForAllNamespacesResponse, - WatchNamespacedIngressResponse, -}; +pub use self::ingress::Ingress; +#[cfg(feature = "api")] pub use self::ingress::{CreateNamespacedIngressOptional, CreateNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::DeleteCollectionNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::DeleteNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::ListIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::ListNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressStatusResponse; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressOptional, ReadNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::WatchIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::WatchNamespacedIngressResponse; mod ingress_backend; -pub use self::ingress_backend::{ - IngressBackend, -}; +pub use self::ingress_backend::IngressBackend; mod ingress_list; -pub use self::ingress_list::{ - IngressList, -}; +pub use self::ingress_list::IngressList; mod ingress_rule; -pub use self::ingress_rule::{ - IngressRule, -}; +pub use self::ingress_rule::IngressRule; mod ingress_spec; -pub use self::ingress_spec::{ - IngressSpec, -}; +pub use self::ingress_spec::IngressSpec; mod ingress_status; -pub use self::ingress_status::{ - IngressStatus, -}; +pub use self::ingress_status::IngressStatus; mod ingress_tls; -pub use self::ingress_tls::{ - IngressTLS, -}; +pub use self::ingress_tls::IngressTLS; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedReplicationControllerDummyScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerDummyScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_11/api/extensions/v1beta1/network_policy.rs b/src/v1_11/api/extensions/v1beta1/network_policy.rs index ebc59c0d3d..d0a3a70471 100644 --- a/src/v1_11/api/extensions/v1beta1/network_policy.rs +++ b/src/v1_11/api/extensions/v1beta1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_11::api::extensions::v1beta1::NetworkPolicy, @@ -58,6 +59,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_11::api::extensions::v1beta1::NetworkPolicy), @@ -73,6 +76,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -339,12 +350,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_11::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_11::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_11::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_11::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_11::api::extensions::v1beta1::NetworkPolicy), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -750,6 +777,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -771,12 +799,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -840,12 +871,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/extensions/v1beta1/pod_security_policy.rs b/src/v1_11/api/extensions/v1beta1/pod_security_policy.rs index 07cbbc9b57..55f831d1ac 100644 --- a/src/v1_11/api/extensions/v1beta1/pod_security_policy.rs +++ b/src/v1_11/api/extensions/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_11::api::extensions::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -51,6 +52,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_11::api::extensions::v1beta1::PodSecurityPolicy), @@ -66,6 +69,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -147,6 +152,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_11::api::extensions::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_11::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -477,6 +494,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_11::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_11::api::extensions::v1beta1::PodSecurityPolicy, @@ -569,6 +590,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_11::api::extensions::v1beta1::PodSecurityPolicy), @@ -583,6 +606,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/extensions/v1beta1/replica_set.rs b/src/v1_11/api/extensions/v1beta1/replica_set.rs index 036cf3c6ef..6aaaa71119 100644 --- a/src/v1_11/api/extensions/v1beta1/replica_set.rs +++ b/src/v1_11/api/extensions/v1beta1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_11::api::extensions::v1beta1::ReplicaSet, @@ -61,6 +62,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_11::api::extensions::v1beta1::ReplicaSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_11::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_11::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_11::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_11::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_11::api::extensions::v1beta1::ReplicaSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_11::api::extensions::v1beta1::ReplicaSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/extensions/v1beta1/scale.rs b/src/v1_11/api/extensions/v1beta1/scale.rs index fe7c6fbb06..0661b81ed2 100644 --- a/src/v1_11/api/extensions/v1beta1/scale.rs +++ b/src/v1_11/api/extensions/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_11::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_11::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_11::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_11::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -595,6 +617,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -602,6 +625,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_11::api::extensions::v1beta1::Scale), @@ -609,6 +633,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +693,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -698,6 +724,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -705,6 +732,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_11::api::extensions::v1beta1::Scale), @@ -712,6 +740,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +800,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -801,6 +831,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -808,6 +839,7 @@ pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_11::api::extensions::v1beta1::Scale), @@ -815,6 +847,7 @@ pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/networking/v1/mod.rs b/src/v1_11/api/networking/v1/mod.rs index fcd95f99a8..23233ec53d 100644 --- a/src/v1_11/api/networking/v1/mod.rs +++ b/src/v1_11/api/networking/v1/mod.rs @@ -1,50 +1,34 @@ mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; diff --git a/src/v1_11/api/networking/v1/network_policy.rs b/src/v1_11/api/networking/v1/network_policy.rs index 2e10cea6e0..6fa5512ba8 100644 --- a/src/v1_11/api/networking/v1/network_policy.rs +++ b/src/v1_11/api/networking/v1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_11::api::networking::v1::NetworkPolicy, @@ -58,6 +59,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_11::api::networking::v1::NetworkPolicy), @@ -73,6 +76,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -339,12 +350,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_11::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_11::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_11::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_11::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_11::api::networking::v1::NetworkPolicy), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -750,6 +777,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -771,12 +799,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -840,12 +871,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/policy/v1beta1/eviction.rs b/src/v1_11/api/policy/v1beta1/eviction.rs index b8041e47e4..64aa2673a4 100644 --- a/src/v1_11/api/policy/v1beta1/eviction.rs +++ b/src/v1_11/api/policy/v1beta1/eviction.rs @@ -34,6 +34,7 @@ impl Eviction { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_eviction( name: &str, namespace: &str, @@ -64,6 +65,7 @@ impl Eviction { } /// Optional parameters of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodEvictionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,6 +73,7 @@ pub struct CreateNamespacedPodEvictionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodEvictionResponse { Ok(crate::v1_11::api::policy::v1beta1::Eviction), @@ -79,6 +82,7 @@ pub enum CreateNamespacedPodEvictionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodEvictionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/policy/v1beta1/mod.rs b/src/v1_11/api/policy/v1beta1/mod.rs index 4d8a99d607..336d3ebb5d 100644 --- a/src/v1_11/api/policy/v1beta1/mod.rs +++ b/src/v1_11/api/policy/v1beta1/mod.rs @@ -1,102 +1,70 @@ mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod eviction; -pub use self::eviction::{ - Eviction, - CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse, -}; +pub use self::eviction::Eviction; +#[cfg(feature = "api")] pub use self::eviction::{CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse}; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod pod_disruption_budget; -pub use self::pod_disruption_budget::{ - PodDisruptionBudget, - CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse, - DeleteCollectionNamespacedPodDisruptionBudgetResponse, - DeleteNamespacedPodDisruptionBudgetResponse, - ListNamespacedPodDisruptionBudgetResponse, - ListPodDisruptionBudgetForAllNamespacesResponse, - PatchNamespacedPodDisruptionBudgetResponse, - PatchNamespacedPodDisruptionBudgetStatusResponse, - ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse, - ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse, - ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse, - ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse, - WatchNamespacedPodDisruptionBudgetResponse, - WatchPodDisruptionBudgetForAllNamespacesResponse, -}; +pub use self::pod_disruption_budget::PodDisruptionBudget; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteCollectionNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListPodDisruptionBudgetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetStatusResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchPodDisruptionBudgetForAllNamespacesResponse; mod pod_disruption_budget_list; -pub use self::pod_disruption_budget_list::{ - PodDisruptionBudgetList, -}; +pub use self::pod_disruption_budget_list::PodDisruptionBudgetList; mod pod_disruption_budget_spec; -pub use self::pod_disruption_budget_spec::{ - PodDisruptionBudgetSpec, -}; +pub use self::pod_disruption_budget_spec::PodDisruptionBudgetSpec; mod pod_disruption_budget_status; -pub use self::pod_disruption_budget_status::{ - PodDisruptionBudgetStatus, -}; +pub use self::pod_disruption_budget_status::PodDisruptionBudgetStatus; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_11/api/policy/v1beta1/pod_disruption_budget.rs b/src/v1_11/api/policy/v1beta1/pod_disruption_budget.rs index de77647f09..33842a5292 100644 --- a/src/v1_11/api/policy/v1beta1/pod_disruption_budget.rs +++ b/src/v1_11/api/policy/v1beta1/pod_disruption_budget.rs @@ -32,6 +32,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_disruption_budget( namespace: &str, body: &crate::v1_11::api::policy::v1beta1::PodDisruptionBudget, @@ -60,6 +61,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,6 +69,7 @@ pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_11::api::policy::v1beta1::PodDisruptionBudget), @@ -75,6 +78,7 @@ pub enum CreateNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -140,6 +144,7 @@ impl PodDisruptionBudget { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_disruption_budget( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -163,6 +168,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_collection_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -170,6 +176,7 @@ pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -232,6 +239,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -253,6 +261,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -260,6 +269,7 @@ pub enum DeleteNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -341,12 +352,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_11::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -390,6 +403,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_disruption_budget_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -408,12 +422,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_11::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -465,6 +481,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -494,12 +511,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_11::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -551,6 +570,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -580,12 +600,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_11::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -635,6 +657,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -671,6 +694,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -682,12 +706,14 @@ pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_11::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -737,6 +763,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -765,6 +792,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -772,12 +800,14 @@ pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_11::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -829,6 +859,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -859,6 +890,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -866,6 +898,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_11::api::policy::v1beta1::PodDisruptionBudget), @@ -873,6 +906,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -932,6 +966,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -962,6 +997,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -969,6 +1005,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_11::api::policy::v1beta1::PodDisruptionBudget), @@ -976,6 +1013,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1031,6 +1069,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -1052,12 +1091,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1103,6 +1144,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_disruption_budget_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1121,12 +1163,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/policy/v1beta1/pod_security_policy.rs b/src/v1_11/api/policy/v1beta1/pod_security_policy.rs index a17f5ddbf1..e036a0ad3d 100644 --- a/src/v1_11/api/policy/v1beta1/pod_security_policy.rs +++ b/src/v1_11/api/policy/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_11::api::policy::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -51,6 +52,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_11::api::policy::v1beta1::PodSecurityPolicy), @@ -66,6 +69,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -147,6 +152,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_11::api::policy::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_11::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -477,6 +494,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_11::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_11::api::policy::v1beta1::PodSecurityPolicy, @@ -569,6 +590,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_11::api::policy::v1beta1::PodSecurityPolicy), @@ -583,6 +606,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1/cluster_role.rs b/src/v1_11/api/rbac/v1/cluster_role.rs index f5ed6f3375..3abdc211fc 100644 --- a/src/v1_11/api/rbac/v1/cluster_role.rs +++ b/src/v1_11/api/rbac/v1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_11::api::rbac::v1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1::ClusterRole), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_11::api::rbac::v1::ClusterRole, @@ -560,6 +581,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1::ClusterRole), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1/cluster_role_binding.rs b/src/v1_11/api/rbac/v1/cluster_role_binding.rs index 2a9a852a9d..a824791bdb 100644 --- a/src/v1_11/api/rbac/v1/cluster_role_binding.rs +++ b/src/v1_11/api/rbac/v1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_11::api::rbac::v1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1::ClusterRoleBinding), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_11::api::rbac::v1::ClusterRoleBinding, @@ -560,6 +581,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1::ClusterRoleBinding), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1/mod.rs b/src/v1_11/api/rbac/v1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_11/api/rbac/v1/mod.rs +++ b/src/v1_11/api/rbac/v1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_11/api/rbac/v1/role.rs b/src/v1_11/api/rbac/v1/role.rs index a4dde32d99..b70f7e2a43 100644 --- a/src/v1_11/api/rbac/v1/role.rs +++ b/src/v1_11/api/rbac/v1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_11::api::rbac::v1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1::Role), @@ -73,6 +76,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -339,12 +350,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_11::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -575,6 +595,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,12 +603,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +662,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -669,6 +693,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,6 +701,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1::Role), @@ -683,6 +709,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +765,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -759,12 +787,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -810,6 +840,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -828,12 +859,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1/role_binding.rs b/src/v1_11/api/rbac/v1/role_binding.rs index a714363b29..48a478da8e 100644 --- a/src/v1_11/api/rbac/v1/role_binding.rs +++ b/src/v1_11/api/rbac/v1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_11::api::rbac::v1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1::RoleBinding), @@ -76,6 +79,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -342,12 +353,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_11::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -578,6 +598,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -585,12 +606,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -672,6 +696,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -679,6 +704,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1::RoleBinding), @@ -686,6 +712,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +768,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -762,12 +790,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -813,6 +843,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -831,12 +862,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1alpha1/cluster_role.rs b/src/v1_11/api/rbac/v1alpha1/cluster_role.rs index b0b5493792..3e9c8d5e60 100644 --- a/src/v1_11/api/rbac/v1alpha1/cluster_role.rs +++ b/src/v1_11/api/rbac/v1alpha1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_11::api::rbac::v1alpha1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1alpha1::ClusterRole), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1alpha1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_11::api::rbac::v1alpha1::ClusterRole, @@ -560,6 +581,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1alpha1::ClusterRole), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1alpha1/cluster_role_binding.rs b/src/v1_11/api/rbac/v1alpha1/cluster_role_binding.rs index 84dd59f08d..196f109a19 100644 --- a/src/v1_11/api/rbac/v1alpha1/cluster_role_binding.rs +++ b/src/v1_11/api/rbac/v1alpha1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_11::api::rbac::v1alpha1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1alpha1::ClusterRoleBinding), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1alpha1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_11::api::rbac::v1alpha1::ClusterRoleBinding, @@ -560,6 +581,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1alpha1::ClusterRoleBinding), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1alpha1/mod.rs b/src/v1_11/api/rbac/v1alpha1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_11/api/rbac/v1alpha1/mod.rs +++ b/src/v1_11/api/rbac/v1alpha1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_11/api/rbac/v1alpha1/role.rs b/src/v1_11/api/rbac/v1alpha1/role.rs index 2a4ffdb2e2..bb875ae092 100644 --- a/src/v1_11/api/rbac/v1alpha1/role.rs +++ b/src/v1_11/api/rbac/v1alpha1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_11::api::rbac::v1alpha1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1alpha1::Role), @@ -73,6 +76,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -339,12 +350,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_11::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -575,6 +595,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,12 +603,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +662,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -669,6 +693,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,6 +701,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1alpha1::Role), @@ -683,6 +709,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +765,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -759,12 +787,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -810,6 +840,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -828,12 +859,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1alpha1/role_binding.rs b/src/v1_11/api/rbac/v1alpha1/role_binding.rs index 2134ead466..5e19424452 100644 --- a/src/v1_11/api/rbac/v1alpha1/role_binding.rs +++ b/src/v1_11/api/rbac/v1alpha1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_11::api::rbac::v1alpha1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1alpha1::RoleBinding), @@ -76,6 +79,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -342,12 +353,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_11::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -578,6 +598,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -585,12 +606,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -672,6 +696,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -679,6 +704,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1alpha1::RoleBinding), @@ -686,6 +712,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +768,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -762,12 +790,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -813,6 +843,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -831,12 +862,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1beta1/cluster_role.rs b/src/v1_11/api/rbac/v1beta1/cluster_role.rs index 7b09508c14..94fa841871 100644 --- a/src/v1_11/api/rbac/v1beta1/cluster_role.rs +++ b/src/v1_11/api/rbac/v1beta1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_11::api::rbac::v1beta1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1beta1::ClusterRole), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1beta1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_11::api::rbac::v1beta1::ClusterRole, @@ -560,6 +581,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_11::api::rbac::v1beta1::ClusterRole), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1beta1/cluster_role_binding.rs b/src/v1_11/api/rbac/v1beta1/cluster_role_binding.rs index 4b0edc8398..ac055535ee 100644 --- a/src/v1_11/api/rbac/v1beta1/cluster_role_binding.rs +++ b/src/v1_11/api/rbac/v1beta1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_11::api::rbac::v1beta1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1beta1::ClusterRoleBinding), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1beta1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_11::api::rbac::v1beta1::ClusterRoleBinding, @@ -560,6 +581,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1beta1::ClusterRoleBinding), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1beta1/mod.rs b/src/v1_11/api/rbac/v1beta1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_11/api/rbac/v1beta1/mod.rs +++ b/src/v1_11/api/rbac/v1beta1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_11/api/rbac/v1beta1/role.rs b/src/v1_11/api/rbac/v1beta1/role.rs index b081015ce4..0cd55deee3 100644 --- a/src/v1_11/api/rbac/v1beta1/role.rs +++ b/src/v1_11/api/rbac/v1beta1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_11::api::rbac::v1beta1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1beta1::Role), @@ -73,6 +76,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -339,12 +350,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_11::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -575,6 +595,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,12 +603,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +662,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -669,6 +693,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,6 +701,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_11::api::rbac::v1beta1::Role), @@ -683,6 +709,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +765,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -759,12 +787,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -810,6 +840,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -828,12 +859,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/rbac/v1beta1/role_binding.rs b/src/v1_11/api/rbac/v1beta1/role_binding.rs index 39ccdb28e2..4c30d0897d 100644 --- a/src/v1_11/api/rbac/v1beta1/role_binding.rs +++ b/src/v1_11/api/rbac/v1beta1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_11::api::rbac::v1beta1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1beta1::RoleBinding), @@ -76,6 +79,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -342,12 +353,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_11::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -578,6 +598,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -585,12 +606,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -672,6 +696,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -679,6 +704,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_11::api::rbac::v1beta1::RoleBinding), @@ -686,6 +712,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +768,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -762,12 +790,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -813,6 +843,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -831,12 +862,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/scheduling/v1alpha1/mod.rs b/src/v1_11/api/scheduling/v1alpha1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_11/api/scheduling/v1alpha1/mod.rs +++ b/src/v1_11/api/scheduling/v1alpha1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_11/api/scheduling/v1alpha1/priority_class.rs b/src/v1_11/api/scheduling/v1alpha1/priority_class.rs index 3298825d25..f56c35c6dd 100644 --- a/src/v1_11/api/scheduling/v1alpha1/priority_class.rs +++ b/src/v1_11/api/scheduling/v1alpha1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_11::api::scheduling::v1alpha1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -57,6 +58,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -64,6 +66,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_11::api::scheduling::v1alpha1::PriorityClass), @@ -72,6 +75,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -133,6 +137,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -153,6 +158,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -160,6 +166,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -218,6 +225,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -237,6 +245,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -244,6 +253,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -300,6 +310,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -318,12 +329,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_11::api::scheduling::v1alpha1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -371,6 +384,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -398,12 +412,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_11::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -449,6 +465,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -483,6 +500,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -494,12 +512,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_11::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +567,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_11::api::scheduling::v1alpha1::PriorityClass, @@ -575,6 +596,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,6 +604,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_11::api::scheduling::v1alpha1::PriorityClass), @@ -589,6 +612,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -640,6 +664,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -658,12 +683,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/scheduling/v1beta1/mod.rs b/src/v1_11/api/scheduling/v1beta1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_11/api/scheduling/v1beta1/mod.rs +++ b/src/v1_11/api/scheduling/v1beta1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_11/api/scheduling/v1beta1/priority_class.rs b/src/v1_11/api/scheduling/v1beta1/priority_class.rs index 617a3ee26d..7711662493 100644 --- a/src/v1_11/api/scheduling/v1beta1/priority_class.rs +++ b/src/v1_11/api/scheduling/v1beta1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_11::api::scheduling::v1beta1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -57,6 +58,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -64,6 +66,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_11::api::scheduling::v1beta1::PriorityClass), @@ -72,6 +75,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -133,6 +137,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -153,6 +158,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -160,6 +166,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -218,6 +225,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -237,6 +245,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -244,6 +253,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -300,6 +310,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -318,12 +329,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_11::api::scheduling::v1beta1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -371,6 +384,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -398,12 +412,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_11::api::scheduling::v1beta1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -449,6 +465,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -483,6 +500,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -494,12 +512,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_11::api::scheduling::v1beta1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +567,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_11::api::scheduling::v1beta1::PriorityClass, @@ -575,6 +596,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,6 +604,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_11::api::scheduling::v1beta1::PriorityClass), @@ -589,6 +612,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -640,6 +664,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -658,12 +683,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/settings/v1alpha1/mod.rs b/src/v1_11/api/settings/v1alpha1/mod.rs index f0ebd9df12..7816e600a8 100644 --- a/src/v1_11/api/settings/v1alpha1/mod.rs +++ b/src/v1_11/api/settings/v1alpha1/mod.rs @@ -1,25 +1,19 @@ mod pod_preset; -pub use self::pod_preset::{ - PodPreset, - CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse, - DeleteCollectionNamespacedPodPresetResponse, - DeleteNamespacedPodPresetResponse, - ListNamespacedPodPresetResponse, - ListPodPresetForAllNamespacesResponse, - PatchNamespacedPodPresetResponse, - ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse, - ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse, - WatchNamespacedPodPresetResponse, - WatchPodPresetForAllNamespacesResponse, -}; +pub use self::pod_preset::PodPreset; +#[cfg(feature = "api")] pub use self::pod_preset::{CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteCollectionNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListPodPresetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_preset::PatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::{ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::{ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::WatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::WatchPodPresetForAllNamespacesResponse; mod pod_preset_list; -pub use self::pod_preset_list::{ - PodPresetList, -}; +pub use self::pod_preset_list::PodPresetList; mod pod_preset_spec; -pub use self::pod_preset_spec::{ - PodPresetSpec, -}; +pub use self::pod_preset_spec::PodPresetSpec; diff --git a/src/v1_11/api/settings/v1alpha1/pod_preset.rs b/src/v1_11/api/settings/v1alpha1/pod_preset.rs index ca9b3d385e..f7d68dc4c5 100644 --- a/src/v1_11/api/settings/v1alpha1/pod_preset.rs +++ b/src/v1_11/api/settings/v1alpha1/pod_preset.rs @@ -28,6 +28,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_preset( namespace: &str, body: &crate::v1_11::api::settings::v1alpha1::PodPreset, @@ -56,6 +57,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodPresetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -63,6 +65,7 @@ pub struct CreateNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodPresetResponse { Ok(crate::v1_11::api::settings::v1alpha1::PodPreset), @@ -71,6 +74,7 @@ pub enum CreateNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -136,6 +140,7 @@ impl PodPreset { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_preset( namespace: &str, delete_optional: crate::v1_11::DeleteOptional<'_>, @@ -159,6 +164,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_collection_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodPresetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -228,6 +235,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_preset( name: &str, namespace: &str, @@ -249,6 +257,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodPresetResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -316,6 +326,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_preset( namespace: &str, optional: crate::v1_11::ListOptional<'_>, @@ -337,12 +348,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodPresetResponse { Ok(crate::v1_11::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_preset_for_all_namespaces( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -404,12 +418,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodPresetForAllNamespacesResponse { Ok(crate::v1_11::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -461,6 +477,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_preset( name: &str, namespace: &str, @@ -490,12 +507,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::patch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodPresetResponse { Ok(crate::v1_11::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -545,6 +564,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_preset( name: &str, namespace: &str, @@ -581,6 +601,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodPresetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -592,12 +613,14 @@ pub struct ReadNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodPresetResponse { Ok(crate::v1_11::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -649,6 +672,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_preset( name: &str, namespace: &str, @@ -679,6 +703,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodPresetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -686,6 +711,7 @@ pub struct ReplaceNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodPresetResponse { Ok(crate::v1_11::api::settings::v1alpha1::PodPreset), @@ -693,6 +719,7 @@ pub enum ReplaceNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -748,6 +775,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_preset( namespace: &str, optional: crate::v1_11::WatchOptional<'_>, @@ -769,12 +797,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodPresetResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -820,6 +850,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_preset_for_all_namespaces( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -838,12 +869,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodPresetForAllNamespacesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/storage/v1/mod.rs b/src/v1_11/api/storage/v1/mod.rs index d20d9cc056..0d65688c2d 100644 --- a/src/v1_11/api/storage/v1/mod.rs +++ b/src/v1_11/api/storage/v1/mod.rs @@ -1,18 +1,14 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; diff --git a/src/v1_11/api/storage/v1/storage_class.rs b/src/v1_11/api/storage/v1/storage_class.rs index 439459a547..330213201b 100644 --- a/src/v1_11/api/storage/v1/storage_class.rs +++ b/src/v1_11/api/storage/v1/storage_class.rs @@ -46,6 +46,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_11::api::storage::v1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -71,6 +72,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -78,6 +80,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_11::api::storage::v1::StorageClass), @@ -86,6 +89,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -147,6 +151,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -167,6 +172,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -174,6 +180,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -232,6 +239,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -251,6 +259,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -314,6 +324,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -332,12 +343,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_11::api::storage::v1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -385,6 +398,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -412,12 +426,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_11::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -497,6 +514,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -508,12 +526,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_11::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -561,6 +581,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_11::api::storage::v1::StorageClass, @@ -589,6 +610,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -596,6 +618,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_11::api::storage::v1::StorageClass), @@ -603,6 +626,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +678,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -672,12 +697,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/storage/v1alpha1/mod.rs b/src/v1_11/api/storage/v1alpha1/mod.rs index a5eefeed6c..4b5a7d41ec 100644 --- a/src/v1_11/api/storage/v1alpha1/mod.rs +++ b/src/v1_11/api/storage/v1alpha1/mod.rs @@ -1,38 +1,26 @@ mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_11/api/storage/v1alpha1/volume_attachment.rs b/src/v1_11/api/storage/v1alpha1/volume_attachment.rs index 11abd326c4..c689e4f71e 100644 --- a/src/v1_11/api/storage/v1alpha1/volume_attachment.rs +++ b/src/v1_11/api/storage/v1alpha1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_11::api::storage::v1alpha1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -56,6 +57,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -63,6 +65,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_11::api::storage::v1alpha1::VolumeAttachment), @@ -71,6 +74,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -132,6 +136,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -152,6 +157,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -159,6 +165,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -217,6 +224,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -236,6 +244,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_11::api::storage::v1alpha1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -397,12 +411,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_11::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -482,6 +499,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -493,12 +511,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_11::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +566,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_11::api::storage::v1alpha1::VolumeAttachment, @@ -574,6 +595,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -581,6 +603,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_11::api::storage::v1alpha1::VolumeAttachment), @@ -588,6 +611,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +663,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -657,12 +682,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/storage/v1beta1/mod.rs b/src/v1_11/api/storage/v1beta1/mod.rs index 68d636f0cb..bcaee085a0 100644 --- a/src/v1_11/api/storage/v1beta1/mod.rs +++ b/src/v1_11/api/storage/v1beta1/mod.rs @@ -1,56 +1,40 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_11/api/storage/v1beta1/storage_class.rs b/src/v1_11/api/storage/v1beta1/storage_class.rs index 015ed051d1..eb5e091257 100644 --- a/src/v1_11/api/storage/v1beta1/storage_class.rs +++ b/src/v1_11/api/storage/v1beta1/storage_class.rs @@ -46,6 +46,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_11::api::storage::v1beta1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -71,6 +72,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -78,6 +80,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_11::api::storage::v1beta1::StorageClass), @@ -86,6 +89,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -147,6 +151,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -167,6 +172,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -174,6 +180,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -232,6 +239,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -251,6 +259,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -314,6 +324,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -332,12 +343,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_11::api::storage::v1beta1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -385,6 +398,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -412,12 +426,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_11::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -497,6 +514,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -508,12 +526,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_11::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -561,6 +581,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_11::api::storage::v1beta1::StorageClass, @@ -589,6 +610,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -596,6 +618,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_11::api::storage::v1beta1::StorageClass), @@ -603,6 +626,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +678,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -672,12 +697,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/api/storage/v1beta1/volume_attachment.rs b/src/v1_11/api/storage/v1beta1/volume_attachment.rs index 807f6ab05b..dc0076d47a 100644 --- a/src/v1_11/api/storage/v1beta1/volume_attachment.rs +++ b/src/v1_11/api/storage/v1beta1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_11::api::storage::v1beta1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -56,6 +57,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -63,6 +65,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_11::api::storage::v1beta1::VolumeAttachment), @@ -71,6 +74,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -132,6 +136,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -152,6 +157,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -159,6 +165,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -217,6 +224,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -236,6 +244,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_11::api::storage::v1beta1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -397,12 +411,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_11::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -482,6 +499,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -493,12 +511,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_11::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +566,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_11::api::storage::v1beta1::VolumeAttachment, @@ -574,6 +595,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -581,6 +603,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_11::api::storage::v1beta1::VolumeAttachment), @@ -588,6 +611,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +663,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -657,12 +682,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs b/src/v1_11/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs index dc916e7d9e..b5558611d1 100644 --- a/src/v1_11/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs +++ b/src/v1_11/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs @@ -28,6 +28,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_custom_resource_definition( body: &crate::v1_11::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, optional: CreateCustomResourceDefinitionOptional<'_>, @@ -53,6 +54,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCustomResourceDefinitionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCustomResourceDefinitionResponse { Ok(crate::v1_11::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -68,6 +71,7 @@ pub enum CreateCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -129,6 +133,7 @@ impl CustomResourceDefinition { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_custom_resource_definition( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -149,6 +154,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_collection_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCustomResourceDefinitionResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteCollectionCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_custom_resource_definition( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -233,6 +241,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCustomResourceDefinitionResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_custom_resource_definition( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::list_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCustomResourceDefinitionResponse { Ok(crate::v1_11::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinitionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -394,12 +408,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionResponse { Ok(crate::v1_11::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -447,6 +463,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition_status( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -474,12 +491,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionStatusResponse { Ok(crate::v1_11::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -525,6 +544,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition( name: &str, optional: ReadCustomResourceDefinitionOptional<'_>, @@ -559,6 +579,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -570,12 +591,14 @@ pub struct ReadCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionResponse { Ok(crate::v1_11::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -621,6 +644,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition_status( name: &str, optional: ReadCustomResourceDefinitionStatusOptional<'_>, @@ -647,6 +671,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -654,12 +679,14 @@ pub struct ReadCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionStatusResponse { Ok(crate::v1_11::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -707,6 +734,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition( name: &str, body: &crate::v1_11::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -735,6 +763,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -742,6 +771,7 @@ pub struct ReplaceCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionResponse { Ok(crate::v1_11::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -749,6 +779,7 @@ pub enum ReplaceCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -804,6 +835,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition_status( name: &str, body: &crate::v1_11::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -832,6 +864,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -839,6 +872,7 @@ pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionStatusResponse { Ok(crate::v1_11::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -846,6 +880,7 @@ pub enum ReplaceCustomResourceDefinitionStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -897,6 +932,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_custom_resource_definition( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -915,12 +951,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::watch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCustomResourceDefinitionResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs b/src/v1_11/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs index 6356eefc43..3cdf40231b 100644 --- a/src/v1_11/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs +++ b/src/v1_11/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs @@ -1,101 +1,65 @@ mod custom_resource_column_definition; -pub use self::custom_resource_column_definition::{ - CustomResourceColumnDefinition, -}; +pub use self::custom_resource_column_definition::CustomResourceColumnDefinition; mod custom_resource_definition; -pub use self::custom_resource_definition::{ - CustomResourceDefinition, - CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse, - DeleteCollectionCustomResourceDefinitionResponse, - DeleteCustomResourceDefinitionResponse, - ListCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionStatusResponse, - ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse, - ReadCustomResourceDefinitionStatusOptional, ReadCustomResourceDefinitionStatusResponse, - ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse, - ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse, - WatchCustomResourceDefinitionResponse, -}; +pub use self::custom_resource_definition::CustomResourceDefinition; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCollectionCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::ListCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionStatusResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionStatusOptional, ReadCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::WatchCustomResourceDefinitionResponse; mod custom_resource_definition_condition; -pub use self::custom_resource_definition_condition::{ - CustomResourceDefinitionCondition, -}; +pub use self::custom_resource_definition_condition::CustomResourceDefinitionCondition; mod custom_resource_definition_list; -pub use self::custom_resource_definition_list::{ - CustomResourceDefinitionList, -}; +pub use self::custom_resource_definition_list::CustomResourceDefinitionList; mod custom_resource_definition_names; -pub use self::custom_resource_definition_names::{ - CustomResourceDefinitionNames, -}; +pub use self::custom_resource_definition_names::CustomResourceDefinitionNames; mod custom_resource_definition_spec; -pub use self::custom_resource_definition_spec::{ - CustomResourceDefinitionSpec, -}; +pub use self::custom_resource_definition_spec::CustomResourceDefinitionSpec; mod custom_resource_definition_status; -pub use self::custom_resource_definition_status::{ - CustomResourceDefinitionStatus, -}; +pub use self::custom_resource_definition_status::CustomResourceDefinitionStatus; mod custom_resource_definition_version; -pub use self::custom_resource_definition_version::{ - CustomResourceDefinitionVersion, -}; +pub use self::custom_resource_definition_version::CustomResourceDefinitionVersion; mod custom_resource_subresource_scale; -pub use self::custom_resource_subresource_scale::{ - CustomResourceSubresourceScale, -}; +pub use self::custom_resource_subresource_scale::CustomResourceSubresourceScale; mod custom_resource_subresource_status; -pub use self::custom_resource_subresource_status::{ - CustomResourceSubresourceStatus, -}; +pub use self::custom_resource_subresource_status::CustomResourceSubresourceStatus; mod custom_resource_subresources; -pub use self::custom_resource_subresources::{ - CustomResourceSubresources, -}; +pub use self::custom_resource_subresources::CustomResourceSubresources; mod custom_resource_validation; -pub use self::custom_resource_validation::{ - CustomResourceValidation, -}; +pub use self::custom_resource_validation::CustomResourceValidation; mod external_documentation; -pub use self::external_documentation::{ - ExternalDocumentation, -}; +pub use self::external_documentation::ExternalDocumentation; mod json; -pub use self::json::{ - JSON, -}; +pub use self::json::JSON; mod json_schema_props; -pub use self::json_schema_props::{ - JSONSchemaProps, -}; +pub use self::json_schema_props::JSONSchemaProps; mod json_schema_props_or_array; -pub use self::json_schema_props_or_array::{ - JSONSchemaPropsOrArray, -}; +pub use self::json_schema_props_or_array::JSONSchemaPropsOrArray; mod json_schema_props_or_bool; -pub use self::json_schema_props_or_bool::{ - JSONSchemaPropsOrBool, -}; +pub use self::json_schema_props_or_bool::JSONSchemaPropsOrBool; mod json_schema_props_or_string_array; -pub use self::json_schema_props_or_string_array::{ - JSONSchemaPropsOrStringArray, -}; +pub use self::json_schema_props_or_string_array::JSONSchemaPropsOrStringArray; diff --git a/src/v1_11/apimachinery/pkg/api/resource/mod.rs b/src/v1_11/apimachinery/pkg/api/resource/mod.rs index 352925b923..629eeca5bc 100644 --- a/src/v1_11/apimachinery/pkg/api/resource/mod.rs +++ b/src/v1_11/apimachinery/pkg/api/resource/mod.rs @@ -1,5 +1,3 @@ mod quantity; -pub use self::quantity::{ - Quantity, -}; +pub use self::quantity::Quantity; diff --git a/src/v1_11/apimachinery/pkg/apis/meta/v1/mod.rs b/src/v1_11/apimachinery/pkg/apis/meta/v1/mod.rs index 9654f201d6..2a0195df45 100644 --- a/src/v1_11/apimachinery/pkg/apis/meta/v1/mod.rs +++ b/src/v1_11/apimachinery/pkg/apis/meta/v1/mod.rs @@ -1,115 +1,69 @@ mod api_group; -pub use self::api_group::{ - APIGroup, -}; +pub use self::api_group::APIGroup; mod api_group_list; -pub use self::api_group_list::{ - APIGroupList, -}; +pub use self::api_group_list::APIGroupList; mod api_resource; -pub use self::api_resource::{ - APIResource, -}; +pub use self::api_resource::APIResource; mod api_resource_list; -pub use self::api_resource_list::{ - APIResourceList, -}; +pub use self::api_resource_list::APIResourceList; mod api_versions; -pub use self::api_versions::{ - APIVersions, -}; +pub use self::api_versions::APIVersions; mod delete_options; -pub use self::delete_options::{ - DeleteOptions, -}; +pub use self::delete_options::DeleteOptions; mod group_version_for_discovery; -pub use self::group_version_for_discovery::{ - GroupVersionForDiscovery, -}; +pub use self::group_version_for_discovery::GroupVersionForDiscovery; mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializers; -pub use self::initializers::{ - Initializers, -}; +pub use self::initializers::Initializers; mod label_selector; -pub use self::label_selector::{ - LabelSelector, -}; +pub use self::label_selector::LabelSelector; mod label_selector_requirement; -pub use self::label_selector_requirement::{ - LabelSelectorRequirement, -}; +pub use self::label_selector_requirement::LabelSelectorRequirement; mod list_meta; -pub use self::list_meta::{ - ListMeta, -}; +pub use self::list_meta::ListMeta; mod micro_time; -pub use self::micro_time::{ - MicroTime, -}; +pub use self::micro_time::MicroTime; mod object_meta; -pub use self::object_meta::{ - ObjectMeta, -}; +pub use self::object_meta::ObjectMeta; mod owner_reference; -pub use self::owner_reference::{ - OwnerReference, -}; +pub use self::owner_reference::OwnerReference; mod patch; -pub use self::patch::{ - Patch, -}; +pub use self::patch::Patch; mod preconditions; -pub use self::preconditions::{ - Preconditions, -}; +pub use self::preconditions::Preconditions; mod server_address_by_client_cidr; -pub use self::server_address_by_client_cidr::{ - ServerAddressByClientCIDR, -}; +pub use self::server_address_by_client_cidr::ServerAddressByClientCIDR; mod status; -pub use self::status::{ - Status, -}; +pub use self::status::Status; mod status_cause; -pub use self::status_cause::{ - StatusCause, -}; +pub use self::status_cause::StatusCause; mod status_details; -pub use self::status_details::{ - StatusDetails, -}; +pub use self::status_details::StatusDetails; mod time; -pub use self::time::{ - Time, -}; +pub use self::time::Time; mod watch_event; -pub use self::watch_event::{ - WatchEvent, -}; +pub use self::watch_event::WatchEvent; diff --git a/src/v1_11/apimachinery/pkg/runtime/mod.rs b/src/v1_11/apimachinery/pkg/runtime/mod.rs index 8614e1a158..eb2b8c0503 100644 --- a/src/v1_11/apimachinery/pkg/runtime/mod.rs +++ b/src/v1_11/apimachinery/pkg/runtime/mod.rs @@ -1,5 +1,3 @@ mod raw_extension; -pub use self::raw_extension::{ - RawExtension, -}; +pub use self::raw_extension::RawExtension; diff --git a/src/v1_11/apimachinery/pkg/util/intstr/mod.rs b/src/v1_11/apimachinery/pkg/util/intstr/mod.rs index 0d14f602e5..d3f7196121 100644 --- a/src/v1_11/apimachinery/pkg/util/intstr/mod.rs +++ b/src/v1_11/apimachinery/pkg/util/intstr/mod.rs @@ -1,5 +1,3 @@ mod int_or_string; -pub use self::int_or_string::{ - IntOrString, -}; +pub use self::int_or_string::IntOrString; diff --git a/src/v1_11/apimachinery/pkg/version/mod.rs b/src/v1_11/apimachinery/pkg/version/mod.rs index 540fa68d40..f125e577d1 100644 --- a/src/v1_11/apimachinery/pkg/version/mod.rs +++ b/src/v1_11/apimachinery/pkg/version/mod.rs @@ -1,5 +1,3 @@ mod info; -pub use self::info::{ - Info, -}; +pub use self::info::Info; diff --git a/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs b/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs index fab06ff7a9..daf8d641fb 100644 --- a/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs +++ b/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -53,6 +54,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -68,6 +71,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -129,6 +133,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -148,6 +153,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -155,6 +161,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -213,6 +220,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -233,6 +241,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -394,12 +408,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -447,6 +463,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service_status( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -474,12 +491,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceStatusResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -525,6 +544,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -559,6 +579,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -570,12 +591,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -621,6 +644,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service_status( name: &str, optional: ReadAPIServiceStatusOptional<'_>, @@ -647,6 +671,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -654,12 +679,14 @@ pub struct ReadAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceStatusResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -707,6 +734,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -735,6 +763,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -742,6 +771,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -749,6 +779,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -804,6 +835,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -832,6 +864,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -839,6 +872,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -846,6 +880,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -897,6 +932,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -915,12 +951,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs b/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs index f3c577aa5e..d210366939 100644 --- a/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs +++ b/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs @@ -1,41 +1,29 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - PatchAPIServiceStatusResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceStatusResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs b/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs index 5282975790..ee5f9fddf4 100644 --- a/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs +++ b/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -53,6 +54,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -68,6 +71,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -129,6 +133,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_11::DeleteOptional<'_>, @@ -148,6 +153,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -155,6 +161,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -213,6 +220,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_11::DeleteOptional<'_>, list_optional: crate::v1_11::ListOptional<'_>, @@ -233,6 +241,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_11::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_11::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -394,12 +408,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -447,6 +463,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service_status( name: &str, body: &crate::v1_11::apimachinery::pkg::apis::meta::v1::Patch, @@ -474,12 +491,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceStatusResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -525,6 +544,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -559,6 +579,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -570,12 +591,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -621,6 +644,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service_status( name: &str, optional: ReadAPIServiceStatusOptional<'_>, @@ -647,6 +671,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -654,12 +679,14 @@ pub struct ReadAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceStatusResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -707,6 +734,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -735,6 +763,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -742,6 +771,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -749,6 +779,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -804,6 +835,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -832,6 +864,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -839,6 +872,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_11::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -846,6 +880,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -897,6 +932,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_11::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -915,12 +951,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs b/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs index f3c577aa5e..d210366939 100644 --- a/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs +++ b/src/v1_11/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs @@ -1,41 +1,29 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - PatchAPIServiceStatusResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceStatusResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_11/mod.rs b/src/v1_11/mod.rs index b53c595fb4..60a1a7c937 100644 --- a/src/v1_11/mod.rs +++ b/src/v1_11/mod.rs @@ -1,23 +1,15 @@ mod delete_optional; -pub use self::delete_optional::{ - DeleteOptional, -}; +pub use self::delete_optional::DeleteOptional; mod list_optional; -pub use self::list_optional::{ - ListOptional, -}; +pub use self::list_optional::ListOptional; mod patch_optional; -pub use self::patch_optional::{ - PatchOptional, -}; +pub use self::patch_optional::PatchOptional; mod watch_optional; -pub use self::watch_optional::{ - WatchOptional, -}; +pub use self::watch_optional::WatchOptional; pub mod api; @@ -32,6 +24,7 @@ pub mod kube_aggregator; /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAPIVersionsResponse`]`>` constructor, or [`GetAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/".to_owned(); @@ -45,12 +38,14 @@ pub fn get_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAPIVersionsResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroupList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -85,6 +80,7 @@ impl crate::Response for GetAPIVersionsResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationAPIGroupResponse`]`>` constructor, or [`GetAdmissionregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/".to_owned(); @@ -98,12 +94,14 @@ pub fn get_admissionregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +136,7 @@ impl crate::Response for GetAdmissionregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1alpha1/".to_owned(); @@ -151,12 +150,14 @@ pub fn get_admissionregistration_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1alpha1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -191,6 +192,7 @@ impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1beta1/".to_owned(); @@ -204,12 +206,14 @@ pub fn get_admissionregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +248,7 @@ impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsAPIGroupResponse`]`>` constructor, or [`GetApiextensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/".to_owned(); @@ -257,12 +262,14 @@ pub fn get_apiextensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +304,7 @@ impl crate::Response for GetApiextensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiextensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/v1beta1/".to_owned(); @@ -310,12 +318,14 @@ pub fn get_apiextensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +360,7 @@ impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationAPIGroupResponse`]`>` constructor, or [`GetApiregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/".to_owned(); @@ -363,12 +374,14 @@ pub fn get_apiregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -403,6 +416,7 @@ impl crate::Response for GetApiregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1/".to_owned(); @@ -416,12 +430,14 @@ pub fn get_apiregistration_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -456,6 +472,7 @@ impl crate::Response for GetApiregistrationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1beta1/".to_owned(); @@ -469,12 +486,14 @@ pub fn get_apiregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -509,6 +528,7 @@ impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsAPIGroupResponse`]`>` constructor, or [`GetAppsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/".to_owned(); @@ -522,12 +542,14 @@ pub fn get_apps_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +584,7 @@ impl crate::Response for GetAppsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1APIResourcesResponse`]`>` constructor, or [`GetAppsV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1/".to_owned(); @@ -575,12 +598,14 @@ pub fn get_apps_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -615,6 +640,7 @@ impl crate::Response for GetAppsV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta1APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta1/".to_owned(); @@ -628,12 +654,14 @@ pub fn get_apps_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +696,7 @@ impl crate::Response for GetAppsV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta2APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta2/".to_owned(); @@ -681,12 +710,14 @@ pub fn get_apps_v1beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta2APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -721,6 +752,7 @@ impl crate::Response for GetAppsV1beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationAPIGroupResponse`]`>` constructor, or [`GetAuthenticationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/".to_owned(); @@ -734,12 +766,14 @@ pub fn get_authentication_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +808,7 @@ impl crate::Response for GetAuthenticationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1/".to_owned(); @@ -787,12 +822,14 @@ pub fn get_authentication_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -827,6 +864,7 @@ impl crate::Response for GetAuthenticationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1beta1/".to_owned(); @@ -840,12 +878,14 @@ pub fn get_authentication_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -880,6 +920,7 @@ impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationAPIGroupResponse`]`>` constructor, or [`GetAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/".to_owned(); @@ -893,12 +934,14 @@ pub fn get_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +976,7 @@ impl crate::Response for GetAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1/".to_owned(); @@ -946,12 +990,14 @@ pub fn get_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -986,6 +1032,7 @@ impl crate::Response for GetAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1beta1/".to_owned(); @@ -999,12 +1046,14 @@ pub fn get_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1039,6 +1088,7 @@ impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingAPIGroupResponse`]`>` constructor, or [`GetAutoscalingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/".to_owned(); @@ -1052,12 +1102,14 @@ pub fn get_autoscaling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1092,6 +1144,7 @@ impl crate::Response for GetAutoscalingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v1/".to_owned(); @@ -1105,12 +1158,14 @@ pub fn get_autoscaling_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1145,6 +1200,7 @@ impl crate::Response for GetAutoscalingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta1/".to_owned(); @@ -1158,12 +1214,14 @@ pub fn get_autoscaling_v2beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1198,6 +1256,7 @@ impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchAPIGroupResponse`]`>` constructor, or [`GetBatchAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/".to_owned(); @@ -1211,12 +1270,14 @@ pub fn get_batch_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1251,6 +1312,7 @@ impl crate::Response for GetBatchAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1APIResourcesResponse`]`>` constructor, or [`GetBatchV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1/".to_owned(); @@ -1264,12 +1326,14 @@ pub fn get_batch_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1304,6 +1368,7 @@ impl crate::Response for GetBatchV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1beta1APIResourcesResponse`]`>` constructor, or [`GetBatchV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1beta1/".to_owned(); @@ -1317,12 +1382,14 @@ pub fn get_batch_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1357,6 +1424,7 @@ impl crate::Response for GetBatchV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV2alpha1APIResourcesResponse`]`>` constructor, or [`GetBatchV2alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v2alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v2alpha1/".to_owned(); @@ -1370,12 +1438,14 @@ pub fn get_batch_v2alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v2alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV2alpha1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV2alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1410,6 +1480,7 @@ impl crate::Response for GetBatchV2alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesAPIGroupResponse`]`>` constructor, or [`GetCertificatesAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/".to_owned(); @@ -1423,12 +1494,14 @@ pub fn get_certificates_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1463,6 +1536,7 @@ impl crate::Response for GetCertificatesAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesV1beta1APIResourcesResponse`]`>` constructor, or [`GetCertificatesV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/v1beta1/".to_owned(); @@ -1476,12 +1550,14 @@ pub fn get_certificates_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1516,6 +1592,7 @@ impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { /// get the code version /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCodeVersionResponse`]`>` constructor, or [`GetCodeVersionResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_code_version( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/version/".to_owned(); @@ -1529,12 +1606,14 @@ pub fn get_code_version( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_code_version`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCodeVersionResponse { Ok(crate::v1_11::apimachinery::pkg::version::Info), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCodeVersionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1569,6 +1648,7 @@ impl crate::Response for GetCodeVersionResponse { /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreAPIVersionsResponse`]`>` constructor, or [`GetCoreAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/".to_owned(); @@ -1582,12 +1662,14 @@ pub fn get_core_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreAPIVersionsResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIVersions), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1622,6 +1704,7 @@ impl crate::Response for GetCoreAPIVersionsResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreV1APIResourcesResponse`]`>` constructor, or [`GetCoreV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/v1/".to_owned(); @@ -1635,12 +1718,14 @@ pub fn get_core_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreV1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1675,6 +1760,7 @@ impl crate::Response for GetCoreV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsAPIGroupResponse`]`>` constructor, or [`GetEventsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/".to_owned(); @@ -1688,12 +1774,14 @@ pub fn get_events_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1728,6 +1816,7 @@ impl crate::Response for GetEventsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsV1beta1APIResourcesResponse`]`>` constructor, or [`GetEventsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/v1beta1/".to_owned(); @@ -1741,12 +1830,14 @@ pub fn get_events_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1781,6 +1872,7 @@ impl crate::Response for GetEventsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsAPIGroupResponse`]`>` constructor, or [`GetExtensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/".to_owned(); @@ -1794,12 +1886,14 @@ pub fn get_extensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1834,6 +1928,7 @@ impl crate::Response for GetExtensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetExtensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/v1beta1/".to_owned(); @@ -1847,12 +1942,14 @@ pub fn get_extensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1887,6 +1984,7 @@ impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingAPIGroupResponse`]`>` constructor, or [`GetNetworkingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/".to_owned(); @@ -1900,12 +1998,14 @@ pub fn get_networking_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1940,6 +2040,7 @@ impl crate::Response for GetNetworkingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingV1APIResourcesResponse`]`>` constructor, or [`GetNetworkingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/v1/".to_owned(); @@ -1953,12 +2054,14 @@ pub fn get_networking_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingV1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1993,6 +2096,7 @@ impl crate::Response for GetNetworkingV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyAPIGroupResponse`]`>` constructor, or [`GetPolicyAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/".to_owned(); @@ -2006,12 +2110,14 @@ pub fn get_policy_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2046,6 +2152,7 @@ impl crate::Response for GetPolicyAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyV1beta1APIResourcesResponse`]`>` constructor, or [`GetPolicyV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/v1beta1/".to_owned(); @@ -2059,12 +2166,14 @@ pub fn get_policy_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2099,6 +2208,7 @@ impl crate::Response for GetPolicyV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationAPIGroupResponse`]`>` constructor, or [`GetRbacAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/".to_owned(); @@ -2112,12 +2222,14 @@ pub fn get_rbac_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2152,6 +2264,7 @@ impl crate::Response for GetRbacAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1/".to_owned(); @@ -2165,12 +2278,14 @@ pub fn get_rbac_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2205,6 +2320,7 @@ impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1alpha1/".to_owned(); @@ -2218,12 +2334,14 @@ pub fn get_rbac_authorization_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1alpha1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2258,6 +2376,7 @@ impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1beta1/".to_owned(); @@ -2271,12 +2390,14 @@ pub fn get_rbac_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2311,6 +2432,7 @@ impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingAPIGroupResponse`]`>` constructor, or [`GetSchedulingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/".to_owned(); @@ -2324,12 +2446,14 @@ pub fn get_scheduling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2364,6 +2488,7 @@ impl crate::Response for GetSchedulingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1alpha1/".to_owned(); @@ -2377,12 +2502,14 @@ pub fn get_scheduling_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1alpha1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2417,6 +2544,7 @@ impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1beta1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1beta1/".to_owned(); @@ -2430,12 +2558,14 @@ pub fn get_scheduling_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2470,6 +2600,7 @@ impl crate::Response for GetSchedulingV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsAPIGroupResponse`]`>` constructor, or [`GetSettingsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/".to_owned(); @@ -2483,12 +2614,14 @@ pub fn get_settings_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2523,6 +2656,7 @@ impl crate::Response for GetSettingsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSettingsV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/v1alpha1/".to_owned(); @@ -2536,12 +2670,14 @@ pub fn get_settings_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsV1alpha1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2576,6 +2712,7 @@ impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageAPIGroupResponse`]`>` constructor, or [`GetStorageAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/".to_owned(); @@ -2589,12 +2726,14 @@ pub fn get_storage_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageAPIGroupResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2629,6 +2768,7 @@ impl crate::Response for GetStorageAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1APIResourcesResponse`]`>` constructor, or [`GetStorageV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1/".to_owned(); @@ -2642,12 +2782,14 @@ pub fn get_storage_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2682,6 +2824,7 @@ impl crate::Response for GetStorageV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1alpha1APIResourcesResponse`]`>` constructor, or [`GetStorageV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1alpha1/".to_owned(); @@ -2695,12 +2838,14 @@ pub fn get_storage_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1alpha1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2735,6 +2880,7 @@ impl crate::Response for GetStorageV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1beta1APIResourcesResponse`]`>` constructor, or [`GetStorageV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1beta1/".to_owned(); @@ -2748,12 +2894,14 @@ pub fn get_storage_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1beta1APIResourcesResponse { Ok(crate::v1_11::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2792,6 +2940,7 @@ impl crate::Response for GetStorageV1beta1APIResourcesResponse { /// * `logpath` /// /// path to the log +#[cfg(feature = "api")] pub fn log_file_handler( logpath: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2808,11 +2957,13 @@ pub fn log_file_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2837,6 +2988,7 @@ impl crate::Response for LogFileHandlerResponse { // Generated from operation logFileListHandler /// Use the returned [`crate::ResponseBody`]`<`[`LogFileListHandlerResponse`]`>` constructor, or [`LogFileListHandlerResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn log_file_list_handler( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/logs/".to_owned(); @@ -2850,11 +3002,13 @@ pub fn log_file_list_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_list_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileListHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileListHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/admissionregistration/v1alpha1/initializer_configuration.rs b/src/v1_12/api/admissionregistration/v1alpha1/initializer_configuration.rs index d84dec6e0c..809c41f72b 100644 --- a/src/v1_12/api/admissionregistration/v1alpha1/initializer_configuration.rs +++ b/src/v1_12/api/admissionregistration/v1alpha1/initializer_configuration.rs @@ -26,6 +26,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_initializer_configuration( body: &crate::v1_12::api::admissionregistration::v1alpha1::InitializerConfiguration, optional: CreateInitializerConfigurationOptional<'_>, @@ -59,6 +60,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateInitializerConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateInitializerConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1alpha1::InitializerConfiguration), @@ -78,6 +81,7 @@ pub enum CreateInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl InitializerConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_initializer_configuration( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -159,6 +164,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_collection_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionInitializerConfigurationResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_initializer_configuration( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteInitializerConfigurationResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_initializer_configuration( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::list_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListInitializerConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1alpha1::InitializerConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_initializer_configuration( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::patch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchInitializerConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_initializer_configuration( name: &str, optional: ReadInitializerConfigurationOptional<'_>, @@ -498,6 +515,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadInitializerConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -509,12 +527,14 @@ pub struct ReadInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadInitializerConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_initializer_configuration( name: &str, body: &crate::v1_12::api::admissionregistration::v1alpha1::InitializerConfiguration, @@ -594,6 +615,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceInitializerConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -603,6 +625,7 @@ pub struct ReplaceInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceInitializerConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1alpha1::InitializerConfiguration), @@ -610,6 +633,7 @@ pub enum ReplaceInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_initializer_configuration( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -679,12 +704,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::watch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchInitializerConfigurationResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/admissionregistration/v1alpha1/mod.rs b/src/v1_12/api/admissionregistration/v1alpha1/mod.rs index b1ef774c7b..2657f18e2f 100644 --- a/src/v1_12/api/admissionregistration/v1alpha1/mod.rs +++ b/src/v1_12/api/admissionregistration/v1alpha1/mod.rs @@ -1,28 +1,20 @@ mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializer_configuration; -pub use self::initializer_configuration::{ - InitializerConfiguration, - CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse, - DeleteCollectionInitializerConfigurationResponse, - DeleteInitializerConfigurationResponse, - ListInitializerConfigurationResponse, - PatchInitializerConfigurationResponse, - ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse, - ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse, - WatchInitializerConfigurationResponse, -}; +pub use self::initializer_configuration::InitializerConfiguration; +#[cfg(feature = "api")] pub use self::initializer_configuration::{CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteCollectionInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::ListInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::PatchInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::WatchInitializerConfigurationResponse; mod initializer_configuration_list; -pub use self::initializer_configuration_list::{ - InitializerConfigurationList, -}; +pub use self::initializer_configuration_list::InitializerConfigurationList; mod rule; -pub use self::rule::{ - Rule, -}; +pub use self::rule::Rule; diff --git a/src/v1_12/api/admissionregistration/v1beta1/mod.rs b/src/v1_12/api/admissionregistration/v1beta1/mod.rs index 9e4dd8f5a8..7dd5906135 100644 --- a/src/v1_12/api/admissionregistration/v1beta1/mod.rs +++ b/src/v1_12/api/admissionregistration/v1beta1/mod.rs @@ -1,56 +1,40 @@ mod mutating_webhook_configuration; -pub use self::mutating_webhook_configuration::{ - MutatingWebhookConfiguration, - CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse, - DeleteCollectionMutatingWebhookConfigurationResponse, - DeleteMutatingWebhookConfigurationResponse, - ListMutatingWebhookConfigurationResponse, - PatchMutatingWebhookConfigurationResponse, - ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse, - ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse, - WatchMutatingWebhookConfigurationResponse, -}; +pub use self::mutating_webhook_configuration::MutatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteCollectionMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::ListMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::PatchMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::WatchMutatingWebhookConfigurationResponse; mod mutating_webhook_configuration_list; -pub use self::mutating_webhook_configuration_list::{ - MutatingWebhookConfigurationList, -}; +pub use self::mutating_webhook_configuration_list::MutatingWebhookConfigurationList; mod rule_with_operations; -pub use self::rule_with_operations::{ - RuleWithOperations, -}; +pub use self::rule_with_operations::RuleWithOperations; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod validating_webhook_configuration; -pub use self::validating_webhook_configuration::{ - ValidatingWebhookConfiguration, - CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse, - DeleteCollectionValidatingWebhookConfigurationResponse, - DeleteValidatingWebhookConfigurationResponse, - ListValidatingWebhookConfigurationResponse, - PatchValidatingWebhookConfigurationResponse, - ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse, - ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse, - WatchValidatingWebhookConfigurationResponse, -}; +pub use self::validating_webhook_configuration::ValidatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteCollectionValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::ListValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::PatchValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::WatchValidatingWebhookConfigurationResponse; mod validating_webhook_configuration_list; -pub use self::validating_webhook_configuration_list::{ - ValidatingWebhookConfigurationList, -}; +pub use self::validating_webhook_configuration_list::ValidatingWebhookConfigurationList; mod webhook; -pub use self::webhook::{ - Webhook, -}; +pub use self::webhook::Webhook; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; diff --git a/src/v1_12/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs b/src/v1_12/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs index 2ffa716377..0ac1fb337e 100644 --- a/src/v1_12/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs +++ b/src/v1_12/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_mutating_webhook_configuration( body: &crate::v1_12::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, optional: CreateMutatingWebhookConfigurationOptional<'_>, @@ -59,6 +60,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateMutatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateMutatingWebhookConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -78,6 +81,7 @@ pub enum CreateMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl MutatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_mutating_webhook_configuration( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -159,6 +164,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_collection_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionMutatingWebhookConfigurationResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_mutating_webhook_configuration( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteMutatingWebhookConfigurationResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_mutating_webhook_configuration( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::list_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListMutatingWebhookConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1beta1::MutatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_mutating_webhook_configuration( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::patch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchMutatingWebhookConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_mutating_webhook_configuration( name: &str, optional: ReadMutatingWebhookConfigurationOptional<'_>, @@ -498,6 +515,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadMutatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -509,12 +527,14 @@ pub struct ReadMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadMutatingWebhookConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_mutating_webhook_configuration( name: &str, body: &crate::v1_12::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, @@ -594,6 +615,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -603,6 +625,7 @@ pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceMutatingWebhookConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -610,6 +633,7 @@ pub enum ReplaceMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_mutating_webhook_configuration( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -679,12 +704,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::watch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchMutatingWebhookConfigurationResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/admissionregistration/v1beta1/validating_webhook_configuration.rs b/src/v1_12/api/admissionregistration/v1beta1/validating_webhook_configuration.rs index a485799c8d..6a41a0ad31 100644 --- a/src/v1_12/api/admissionregistration/v1beta1/validating_webhook_configuration.rs +++ b/src/v1_12/api/admissionregistration/v1beta1/validating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_validating_webhook_configuration( body: &crate::v1_12::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, optional: CreateValidatingWebhookConfigurationOptional<'_>, @@ -59,6 +60,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateValidatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateValidatingWebhookConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -78,6 +81,7 @@ pub enum CreateValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl ValidatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_validating_webhook_configuration( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -159,6 +164,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_collection_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionValidatingWebhookConfigurationResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_validating_webhook_configuration( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteValidatingWebhookConfigurationResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_validating_webhook_configuration( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::list_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListValidatingWebhookConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1beta1::ValidatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_validating_webhook_configuration( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::patch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchValidatingWebhookConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_validating_webhook_configuration( name: &str, optional: ReadValidatingWebhookConfigurationOptional<'_>, @@ -498,6 +515,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadValidatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -509,12 +527,14 @@ pub struct ReadValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadValidatingWebhookConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_validating_webhook_configuration( name: &str, body: &crate::v1_12::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, @@ -594,6 +615,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -603,6 +625,7 @@ pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceValidatingWebhookConfigurationResponse { Ok(crate::v1_12::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -610,6 +633,7 @@ pub enum ReplaceValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_validating_webhook_configuration( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -679,12 +704,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::watch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchValidatingWebhookConfigurationResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1/controller_revision.rs b/src/v1_12/api/apps/v1/controller_revision.rs index ff62cc30c4..fd3ff4a66c 100644 --- a/src/v1_12/api/apps/v1/controller_revision.rs +++ b/src/v1_12/api/apps/v1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_12::api::apps::v1::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -709,6 +733,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -718,6 +743,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1::ControllerRevision), @@ -725,6 +751,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -776,6 +803,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -794,12 +822,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -870,12 +901,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1/daemon_set.rs b/src/v1_12/api/apps/v1/daemon_set.rs index eb084f40c8..f79c47ba4b 100644 --- a/src/v1_12/api/apps/v1/daemon_set.rs +++ b/src/v1_12/api/apps/v1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_12::api::apps::v1::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_12::api::apps::v1::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_12::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_12::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_12::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_12::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_12::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_12::api::apps::v1::DaemonSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_12::api::apps::v1::DaemonSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1/deployment.rs b/src/v1_12/api/apps/v1/deployment.rs index 73a7d01bc6..4dae438fc2 100644 --- a/src/v1_12/api/apps/v1/deployment.rs +++ b/src/v1_12/api/apps/v1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_12::api::apps::v1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1::Deployment), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::apps::v1::Deployment), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1/mod.rs b/src/v1_12/api/apps/v1/mod.rs index a25b916f02..971a3fb358 100644 --- a/src/v1_12/api/apps/v1/mod.rs +++ b/src/v1_12/api/apps/v1/mod.rs @@ -1,202 +1,146 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_12/api/apps/v1/replica_set.rs b/src/v1_12/api/apps/v1/replica_set.rs index 5db7fd2a15..cc8546d2ca 100644 --- a/src/v1_12/api/apps/v1/replica_set.rs +++ b/src/v1_12/api/apps/v1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_12::api::apps::v1::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_12::api::apps::v1::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_12::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_12::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_12::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_12::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_12::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_12::api::apps::v1::ReplicaSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_12::api::apps::v1::ReplicaSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1/stateful_set.rs b/src/v1_12/api/apps/v1/stateful_set.rs index ac86c198eb..ea17172de1 100644 --- a/src/v1_12/api/apps/v1/stateful_set.rs +++ b/src/v1_12/api/apps/v1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_12::api::apps::v1::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_12::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_12::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -887,6 +918,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -896,6 +928,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1::StatefulSet), @@ -903,6 +936,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -962,6 +996,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -996,6 +1031,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1005,6 +1041,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_12::api::apps::v1::StatefulSet), @@ -1012,6 +1049,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1067,6 +1105,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1088,12 +1127,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1139,6 +1180,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1157,12 +1199,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1beta1/controller_revision.rs b/src/v1_12/api/apps/v1beta1/controller_revision.rs index 5ddedd6561..c2573c6918 100644 --- a/src/v1_12/api/apps/v1beta1/controller_revision.rs +++ b/src/v1_12/api/apps/v1beta1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_12::api::apps::v1beta1::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1beta1::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -709,6 +733,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -718,6 +743,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1beta1::ControllerRevision), @@ -725,6 +751,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -776,6 +803,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -794,12 +822,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -870,12 +901,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1beta1/deployment.rs b/src/v1_12/api/apps/v1beta1/deployment.rs index 6fcba3d3ca..5c703baf87 100644 --- a/src/v1_12/api/apps/v1beta1/deployment.rs +++ b/src/v1_12/api/apps/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_12::api::apps::v1beta1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1beta1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1beta1::Deployment), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::apps::v1beta1::Deployment), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1beta1/deployment_rollback.rs b/src/v1_12/api/apps/v1beta1/deployment_rollback.rs index 1a833f9abc..faaeab7951 100644 --- a/src/v1_12/api/apps/v1beta1/deployment_rollback.rs +++ b/src/v1_12/api/apps/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -75,6 +76,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -86,6 +88,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -94,6 +97,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1beta1/mod.rs b/src/v1_12/api/apps/v1beta1/mod.rs index 93facd2f47..94ca19493a 100644 --- a/src/v1_12/api/apps/v1beta1/mod.rs +++ b/src/v1_12/api/apps/v1beta1/mod.rs @@ -1,148 +1,106 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_12/api/apps/v1beta1/scale.rs b/src/v1_12/api/apps/v1beta1/scale.rs index dfabe80915..13bbe004d9 100644 --- a/src/v1_12/api/apps/v1beta1/scale.rs +++ b/src/v1_12/api/apps/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_12::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -207,6 +213,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -235,6 +242,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -242,12 +250,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -325,6 +336,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -332,12 +344,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_12::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +403,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -423,6 +438,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -432,6 +448,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::apps::v1beta1::Scale), @@ -439,6 +456,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -498,6 +516,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -532,6 +551,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -541,6 +561,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_12::api::apps::v1beta1::Scale), @@ -548,6 +569,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1beta1/stateful_set.rs b/src/v1_12/api/apps/v1beta1/stateful_set.rs index 79f8f8dec4..da3da33a90 100644 --- a/src/v1_12/api/apps/v1beta1/stateful_set.rs +++ b/src/v1_12/api/apps/v1beta1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_12::api::apps::v1beta1::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1beta1::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -887,6 +918,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -896,6 +928,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1beta1::StatefulSet), @@ -903,6 +936,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -962,6 +996,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -996,6 +1031,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1005,6 +1041,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta1::StatefulSet), @@ -1012,6 +1049,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1067,6 +1105,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1088,12 +1127,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1139,6 +1180,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1157,12 +1199,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1beta2/controller_revision.rs b/src/v1_12/api/apps/v1beta2/controller_revision.rs index 7e3723d5aa..b00e2429b9 100644 --- a/src/v1_12/api/apps/v1beta2/controller_revision.rs +++ b/src/v1_12/api/apps/v1beta2/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_12::api::apps::v1beta2::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1beta2::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -709,6 +733,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -718,6 +743,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_12::api::apps::v1beta2::ControllerRevision), @@ -725,6 +751,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -776,6 +803,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -794,12 +822,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -870,12 +901,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1beta2/daemon_set.rs b/src/v1_12/api/apps/v1beta2/daemon_set.rs index d80e492dbe..8a4e83fc0d 100644 --- a/src/v1_12/api/apps/v1beta2/daemon_set.rs +++ b/src/v1_12/api/apps/v1beta2/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_12::api::apps::v1beta2::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_12::api::apps::v1beta2::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_12::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_12::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_12::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_12::api::apps::v1beta2::DaemonSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::DaemonSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1beta2/deployment.rs b/src/v1_12/api/apps/v1beta2/deployment.rs index 4789996f3d..805b12bdcf 100644 --- a/src/v1_12/api/apps/v1beta2/deployment.rs +++ b/src/v1_12/api/apps/v1beta2/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_12::api::apps::v1beta2::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1beta2::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_12::api::apps::v1beta2::Deployment), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::Deployment), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1beta2/mod.rs b/src/v1_12/api/apps/v1beta2/mod.rs index a95884f4d6..60c611aefd 100644 --- a/src/v1_12/api/apps/v1beta2/mod.rs +++ b/src/v1_12/api/apps/v1beta2/mod.rs @@ -1,226 +1,164 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_12/api/apps/v1beta2/replica_set.rs b/src/v1_12/api/apps/v1beta2/replica_set.rs index 7bc8ae8ae0..9f0f4ffe5f 100644 --- a/src/v1_12/api/apps/v1beta2/replica_set.rs +++ b/src/v1_12/api/apps/v1beta2/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_12::api::apps::v1beta2::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_12::api::apps::v1beta2::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_12::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_12::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_12::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_12::api::apps::v1beta2::ReplicaSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::ReplicaSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1beta2/scale.rs b/src/v1_12/api/apps/v1beta2/scale.rs index 9a035cd203..6189320f65 100644 --- a/src/v1_12/api/apps/v1beta2/scale.rs +++ b/src/v1_12/api/apps/v1beta2/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_12::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_12::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_12::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_12::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -599,6 +621,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -608,6 +631,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::apps::v1beta2::Scale), @@ -615,6 +639,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -674,6 +699,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -708,6 +734,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -717,6 +744,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_12::api::apps::v1beta2::Scale), @@ -724,6 +752,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +812,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -817,6 +847,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -826,6 +857,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_12::api::apps::v1beta2::Scale), @@ -833,6 +865,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/apps/v1beta2/stateful_set.rs b/src/v1_12/api/apps/v1beta2/stateful_set.rs index f54cfdeaec..a8646f4fae 100644 --- a/src/v1_12/api/apps/v1beta2/stateful_set.rs +++ b/src/v1_12/api/apps/v1beta2/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_12::api::apps::v1beta2::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1beta2::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_12::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -887,6 +918,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -896,6 +928,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_12::api::apps::v1beta2::StatefulSet), @@ -903,6 +936,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -962,6 +996,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -996,6 +1031,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1005,6 +1041,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_12::api::apps::v1beta2::StatefulSet), @@ -1012,6 +1049,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1067,6 +1105,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1088,12 +1127,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1139,6 +1180,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1157,12 +1199,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/authentication/v1/mod.rs b/src/v1_12/api/authentication/v1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_12/api/authentication/v1/mod.rs +++ b/src/v1_12/api/authentication/v1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_12/api/authentication/v1/token_review.rs b/src/v1_12/api/authentication/v1/token_review.rs index e4152c20dd..178e8fdda6 100644 --- a/src/v1_12/api/authentication/v1/token_review.rs +++ b/src/v1_12/api/authentication/v1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_12::api::authentication::v1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -61,6 +62,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_12::api::authentication::v1::TokenReview), @@ -80,6 +83,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/authentication/v1beta1/mod.rs b/src/v1_12/api/authentication/v1beta1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_12/api/authentication/v1beta1/mod.rs +++ b/src/v1_12/api/authentication/v1beta1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_12/api/authentication/v1beta1/token_review.rs b/src/v1_12/api/authentication/v1beta1/token_review.rs index 56efd75983..4b4819f0a3 100644 --- a/src/v1_12/api/authentication/v1beta1/token_review.rs +++ b/src/v1_12/api/authentication/v1beta1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_12::api::authentication::v1beta1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -61,6 +62,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_12::api::authentication::v1beta1::TokenReview), @@ -80,6 +83,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/authorization/v1/local_subject_access_review.rs b/src/v1_12/api/authorization/v1/local_subject_access_review.rs index 1aadc66562..d97725972c 100644 --- a/src/v1_12/api/authorization/v1/local_subject_access_review.rs +++ b/src/v1_12/api/authorization/v1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_12::api::authorization::v1::LocalSubjectAccessReview, @@ -68,6 +69,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_12::api::authorization::v1::LocalSubjectAccessReview), @@ -87,6 +90,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/authorization/v1/mod.rs b/src/v1_12/api/authorization/v1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_12/api/authorization/v1/mod.rs +++ b/src/v1_12/api/authorization/v1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_12/api/authorization/v1/self_subject_access_review.rs b/src/v1_12/api/authorization/v1/self_subject_access_review.rs index fe52408280..c2848fbcde 100644 --- a/src/v1_12/api/authorization/v1/self_subject_access_review.rs +++ b/src/v1_12/api/authorization/v1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_12::api::authorization::v1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_12::api::authorization::v1::SelfSubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/authorization/v1/self_subject_rules_review.rs b/src/v1_12/api/authorization/v1/self_subject_rules_review.rs index ccdb028978..744a5d01f2 100644 --- a/src/v1_12/api/authorization/v1/self_subject_rules_review.rs +++ b/src/v1_12/api/authorization/v1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_12::api::authorization::v1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_12::api::authorization::v1::SelfSubjectRulesReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/authorization/v1/subject_access_review.rs b/src/v1_12/api/authorization/v1/subject_access_review.rs index 12515a00d7..5bdeee043b 100644 --- a/src/v1_12/api/authorization/v1/subject_access_review.rs +++ b/src/v1_12/api/authorization/v1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_12::api::authorization::v1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_12::api::authorization::v1::SubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/authorization/v1beta1/local_subject_access_review.rs b/src/v1_12/api/authorization/v1beta1/local_subject_access_review.rs index 5f089460f1..c9c02983af 100644 --- a/src/v1_12/api/authorization/v1beta1/local_subject_access_review.rs +++ b/src/v1_12/api/authorization/v1beta1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_12::api::authorization::v1beta1::LocalSubjectAccessReview, @@ -68,6 +69,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_12::api::authorization::v1beta1::LocalSubjectAccessReview), @@ -87,6 +90,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/authorization/v1beta1/mod.rs b/src/v1_12/api/authorization/v1beta1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_12/api/authorization/v1beta1/mod.rs +++ b/src/v1_12/api/authorization/v1beta1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_12/api/authorization/v1beta1/self_subject_access_review.rs b/src/v1_12/api/authorization/v1beta1/self_subject_access_review.rs index b4b657df13..b0894513b3 100644 --- a/src/v1_12/api/authorization/v1beta1/self_subject_access_review.rs +++ b/src/v1_12/api/authorization/v1beta1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_12::api::authorization::v1beta1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_12::api::authorization::v1beta1::SelfSubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/authorization/v1beta1/self_subject_rules_review.rs b/src/v1_12/api/authorization/v1beta1/self_subject_rules_review.rs index f058536a62..e5dc7c4ed8 100644 --- a/src/v1_12/api/authorization/v1beta1/self_subject_rules_review.rs +++ b/src/v1_12/api/authorization/v1beta1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_12::api::authorization::v1beta1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_12::api::authorization::v1beta1::SelfSubjectRulesReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/authorization/v1beta1/subject_access_review.rs b/src/v1_12/api/authorization/v1beta1/subject_access_review.rs index f9f5d4ce79..d4d6ead37e 100644 --- a/src/v1_12/api/authorization/v1beta1/subject_access_review.rs +++ b/src/v1_12/api/authorization/v1beta1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_12::api::authorization::v1beta1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_12::api::authorization::v1beta1::SubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/autoscaling/v1/horizontal_pod_autoscaler.rs b/src/v1_12/api/autoscaling/v1/horizontal_pod_autoscaler.rs index 0a9686003e..d3a6021940 100644 --- a/src/v1_12/api/autoscaling/v1/horizontal_pod_autoscaler.rs +++ b/src/v1_12/api/autoscaling/v1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_12::api::autoscaling::v1::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_12::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_12::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_12::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_12::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/autoscaling/v1/mod.rs b/src/v1_12/api/autoscaling/v1/mod.rs index a4f7a0312d..09ed1f1487 100644 --- a/src/v1_12/api/autoscaling/v1/mod.rs +++ b/src/v1_12/api/autoscaling/v1/mod.rs @@ -1,65 +1,49 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - PatchNamespacedReplicationControllerScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, - ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; diff --git a/src/v1_12/api/autoscaling/v1/scale.rs b/src/v1_12/api/autoscaling/v1/scale.rs index 4219ccff34..8a1267e559 100644 --- a/src/v1_12/api/autoscaling/v1/scale.rs +++ b/src/v1_12/api/autoscaling/v1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -295,6 +304,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -324,12 +334,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -379,6 +391,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -407,6 +420,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -414,12 +428,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -497,6 +514,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -504,12 +522,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -559,6 +579,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -587,6 +608,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -594,12 +616,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -649,6 +673,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -677,6 +702,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -684,12 +710,14 @@ pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +769,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -775,6 +804,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -784,6 +814,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), @@ -791,6 +822,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -850,6 +882,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -884,6 +917,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -893,6 +927,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), @@ -900,6 +935,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -959,6 +995,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -993,6 +1030,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1002,6 +1040,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), @@ -1009,6 +1048,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1068,6 +1108,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -1102,6 +1143,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1111,6 +1153,7 @@ pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerScaleResponse { Ok(crate::v1_12::api::autoscaling::v1::Scale), @@ -1118,6 +1161,7 @@ pub enum ReplaceNamespacedReplicationControllerScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs b/src/v1_12/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs index d7e88d64d2..e2ef845e9c 100644 --- a/src/v1_12/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs +++ b/src/v1_12/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_12::api::autoscaling::v2beta1::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_12::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_12::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_12::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_12::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/autoscaling/v2beta1/mod.rs b/src/v1_12/api/autoscaling/v2beta1/mod.rs index edb3c1e242..83788a8cb3 100644 --- a/src/v1_12/api/autoscaling/v2beta1/mod.rs +++ b/src/v1_12/api/autoscaling/v2beta1/mod.rs @@ -1,93 +1,61 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod external_metric_source; -pub use self::external_metric_source::{ - ExternalMetricSource, -}; +pub use self::external_metric_source::ExternalMetricSource; mod external_metric_status; -pub use self::external_metric_status::{ - ExternalMetricStatus, -}; +pub use self::external_metric_status::ExternalMetricStatus; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_12/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs b/src/v1_12/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs index 1f41723383..6200e46ab5 100644 --- a/src/v1_12/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs +++ b/src/v1_12/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_12::api::autoscaling::v2beta2::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_12::api::autoscaling::v2beta2::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v2beta2::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_12::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_12::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_12::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/autoscaling/v2beta2/mod.rs b/src/v1_12/api/autoscaling/v2beta2/mod.rs index 5823acde4f..2de8195cc9 100644 --- a/src/v1_12/api/autoscaling/v2beta2/mod.rs +++ b/src/v1_12/api/autoscaling/v2beta2/mod.rs @@ -1,108 +1,70 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod external_metric_source; -pub use self::external_metric_source::{ - ExternalMetricSource, -}; +pub use self::external_metric_source::ExternalMetricSource; mod external_metric_status; -pub use self::external_metric_status::{ - ExternalMetricStatus, -}; +pub use self::external_metric_status::ExternalMetricStatus; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_identifier; -pub use self::metric_identifier::{ - MetricIdentifier, -}; +pub use self::metric_identifier::MetricIdentifier; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod metric_target; -pub use self::metric_target::{ - MetricTarget, -}; +pub use self::metric_target::MetricTarget; mod metric_value_status; -pub use self::metric_value_status::{ - MetricValueStatus, -}; +pub use self::metric_value_status::MetricValueStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_12/api/batch/v1/job.rs b/src/v1_12/api/batch/v1/job.rs index 650bada3ff..1021963a06 100644 --- a/src/v1_12/api/batch/v1/job.rs +++ b/src/v1_12/api/batch/v1/job.rs @@ -33,6 +33,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_job( namespace: &str, body: &crate::v1_12::api::batch::v1::Job, @@ -69,6 +70,7 @@ impl Job { } /// Optional parameters of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedJobResponse { Ok(crate::v1_12::api::batch::v1::Job), @@ -88,6 +91,7 @@ pub enum CreateNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Job { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_job( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_collection_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedJobResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedJobResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_job_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListJobForAllNamespacesResponse { Ok(crate::v1_12::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_job( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedJobResponse { Ok(crate::v1_12::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobResponse { Ok(crate::v1_12::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobStatusResponse { Ok(crate::v1_12::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobResponse { Ok(crate::v1_12::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobStatusResponse { Ok(crate::v1_12::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobResponse { Ok(crate::v1_12::api::batch::v1::Job), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobStatusResponse { Ok(crate::v1_12::api::batch::v1::Job), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_job_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchJobForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_job( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedJobResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/batch/v1/mod.rs b/src/v1_12/api/batch/v1/mod.rs index 68e7a18867..97d7bccb74 100644 --- a/src/v1_12/api/batch/v1/mod.rs +++ b/src/v1_12/api/batch/v1/mod.rs @@ -1,38 +1,28 @@ mod job; -pub use self::job::{ - Job, - CreateNamespacedJobOptional, CreateNamespacedJobResponse, - DeleteCollectionNamespacedJobResponse, - DeleteNamespacedJobResponse, - ListJobForAllNamespacesResponse, - ListNamespacedJobResponse, - PatchNamespacedJobResponse, - PatchNamespacedJobStatusResponse, - ReadNamespacedJobOptional, ReadNamespacedJobResponse, - ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse, - ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse, - ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse, - WatchJobForAllNamespacesResponse, - WatchNamespacedJobResponse, -}; +pub use self::job::Job; +#[cfg(feature = "api")] pub use self::job::{CreateNamespacedJobOptional, CreateNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::DeleteCollectionNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::DeleteNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::ListJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::ListNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobStatusResponse; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobOptional, ReadNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::WatchJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::WatchNamespacedJobResponse; mod job_condition; -pub use self::job_condition::{ - JobCondition, -}; +pub use self::job_condition::JobCondition; mod job_list; -pub use self::job_list::{ - JobList, -}; +pub use self::job_list::JobList; mod job_spec; -pub use self::job_spec::{ - JobSpec, -}; +pub use self::job_spec::JobSpec; mod job_status; -pub use self::job_status::{ - JobStatus, -}; +pub use self::job_status::JobStatus; diff --git a/src/v1_12/api/batch/v1beta1/cron_job.rs b/src/v1_12/api/batch/v1beta1/cron_job.rs index 88ead5dc60..298733fbe8 100644 --- a/src/v1_12/api/batch/v1beta1/cron_job.rs +++ b/src/v1_12/api/batch/v1beta1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_12::api::batch::v1beta1::CronJob, @@ -69,6 +70,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_12::api::batch::v1beta1::CronJob), @@ -88,6 +91,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_12::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_12::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_12::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_12::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_12::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_12::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_12::api::batch::v1beta1::CronJob), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_12::api::batch::v1beta1::CronJob), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/batch/v1beta1/mod.rs b/src/v1_12/api/batch/v1beta1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_12/api/batch/v1beta1/mod.rs +++ b/src/v1_12/api/batch/v1beta1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_12/api/batch/v2alpha1/cron_job.rs b/src/v1_12/api/batch/v2alpha1/cron_job.rs index 38d48e504f..7a7c725dee 100644 --- a/src/v1_12/api/batch/v2alpha1/cron_job.rs +++ b/src/v1_12/api/batch/v2alpha1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_12::api::batch::v2alpha1::CronJob, @@ -69,6 +70,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_12::api::batch::v2alpha1::CronJob), @@ -88,6 +91,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_12::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_12::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_12::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_12::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_12::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_12::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_12::api::batch::v2alpha1::CronJob), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_12::api::batch::v2alpha1::CronJob), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/batch/v2alpha1/mod.rs b/src/v1_12/api/batch/v2alpha1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_12/api/batch/v2alpha1/mod.rs +++ b/src/v1_12/api/batch/v2alpha1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_12/api/certificates/v1beta1/certificate_signing_request.rs b/src/v1_12/api/certificates/v1beta1/certificate_signing_request.rs index f637f7dd4c..6c487746a9 100644 --- a/src/v1_12/api/certificates/v1beta1/certificate_signing_request.rs +++ b/src/v1_12/api/certificates/v1beta1/certificate_signing_request.rs @@ -28,6 +28,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_certificate_signing_request( body: &crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest, optional: CreateCertificateSigningRequestOptional<'_>, @@ -61,6 +62,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCertificateSigningRequestOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCertificateSigningRequestResponse { Ok(crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest), @@ -80,6 +83,7 @@ pub enum CreateCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_certificate_signing_request( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCertificateSigningRequestResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl CertificateSigningRequest { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_certificate_signing_request( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -254,6 +262,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_collection_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCertificateSigningRequestResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_certificate_signing_request( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::list_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCertificateSigningRequestResponse { Ok(crate::v1_12::api::certificates::v1beta1::CertificateSigningRequestList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestResponse { Ok(crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request_status( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestStatusResponse { Ok(crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request( name: &str, optional: ReadCertificateSigningRequestOptional<'_>, @@ -580,6 +600,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -591,12 +612,14 @@ pub struct ReadCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestResponse { Ok(crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request_status( name: &str, optional: ReadCertificateSigningRequestStatusOptional<'_>, @@ -668,6 +692,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestStatusResponse { Ok(crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request( name: &str, body: &crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest, @@ -760,6 +788,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -769,6 +798,7 @@ pub struct ReplaceCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestResponse { Ok(crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest), @@ -776,6 +806,7 @@ pub enum ReplaceCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -831,6 +862,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_approval( name: &str, body: &crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest, @@ -863,6 +895,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -872,6 +905,7 @@ pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestApprovalResponse { Ok(crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest), @@ -879,6 +913,7 @@ pub enum ReplaceCertificateSigningRequestApprovalResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestApprovalResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -934,6 +969,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_status( name: &str, body: &crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest, @@ -966,6 +1002,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -975,6 +1012,7 @@ pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestStatusResponse { Ok(crate::v1_12::api::certificates::v1beta1::CertificateSigningRequest), @@ -982,6 +1020,7 @@ pub enum ReplaceCertificateSigningRequestStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1033,6 +1072,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_certificate_signing_request( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1051,12 +1091,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::watch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCertificateSigningRequestResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/certificates/v1beta1/mod.rs b/src/v1_12/api/certificates/v1beta1/mod.rs index 48cb9add17..bb9e9e4c0a 100644 --- a/src/v1_12/api/certificates/v1beta1/mod.rs +++ b/src/v1_12/api/certificates/v1beta1/mod.rs @@ -1,37 +1,27 @@ mod certificate_signing_request; -pub use self::certificate_signing_request::{ - CertificateSigningRequest, - CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse, - DeleteCertificateSigningRequestResponse, - DeleteCollectionCertificateSigningRequestResponse, - ListCertificateSigningRequestResponse, - PatchCertificateSigningRequestResponse, - PatchCertificateSigningRequestStatusResponse, - ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse, - ReadCertificateSigningRequestStatusOptional, ReadCertificateSigningRequestStatusResponse, - ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse, - ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse, - ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse, - WatchCertificateSigningRequestResponse, -}; +pub use self::certificate_signing_request::CertificateSigningRequest; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCollectionCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::ListCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestStatusResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestStatusOptional, ReadCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::WatchCertificateSigningRequestResponse; mod certificate_signing_request_condition; -pub use self::certificate_signing_request_condition::{ - CertificateSigningRequestCondition, -}; +pub use self::certificate_signing_request_condition::CertificateSigningRequestCondition; mod certificate_signing_request_list; -pub use self::certificate_signing_request_list::{ - CertificateSigningRequestList, -}; +pub use self::certificate_signing_request_list::CertificateSigningRequestList; mod certificate_signing_request_spec; -pub use self::certificate_signing_request_spec::{ - CertificateSigningRequestSpec, -}; +pub use self::certificate_signing_request_spec::CertificateSigningRequestSpec; mod certificate_signing_request_status; -pub use self::certificate_signing_request_status::{ - CertificateSigningRequestStatus, -}; +pub use self::certificate_signing_request_status::CertificateSigningRequestStatus; diff --git a/src/v1_12/api/coordination/v1beta1/lease.rs b/src/v1_12/api/coordination/v1beta1/lease.rs index 7c5c4dd96a..b400faebea 100644 --- a/src/v1_12/api/coordination/v1beta1/lease.rs +++ b/src/v1_12/api/coordination/v1beta1/lease.rs @@ -30,6 +30,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_lease( namespace: &str, body: &crate::v1_12::api::coordination::v1beta1::Lease, @@ -66,6 +67,7 @@ impl Lease { } /// Optional parameters of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLeaseResponse { Ok(crate::v1_12::api::coordination::v1beta1::Lease), @@ -85,6 +88,7 @@ pub enum CreateNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Lease { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_lease( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_collection_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLeaseResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_lease( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLeaseResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_lease_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLeaseForAllNamespacesResponse { Ok(crate::v1_12::api::coordination::v1beta1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_lease( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -427,12 +441,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLeaseResponse { Ok(crate::v1_12::api::coordination::v1beta1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_lease( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::patch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLeaseResponse { Ok(crate::v1_12::api::coordination::v1beta1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_lease( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl Lease { } /// Optional parameters of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLeaseOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -615,12 +636,14 @@ pub struct ReadNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLeaseResponse { Ok(crate::v1_12::api::coordination::v1beta1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_lease( name: &str, namespace: &str, @@ -706,6 +730,7 @@ impl Lease { } /// Optional parameters of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -715,6 +740,7 @@ pub struct ReplaceNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLeaseResponse { Ok(crate::v1_12::api::coordination::v1beta1::Lease), @@ -722,6 +748,7 @@ pub enum ReplaceNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -773,6 +800,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_lease_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -791,12 +819,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLeaseForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -846,6 +876,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_lease( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -867,12 +898,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLeaseResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/coordination/v1beta1/mod.rs b/src/v1_12/api/coordination/v1beta1/mod.rs index 5c3207ad2d..ff1ce80627 100644 --- a/src/v1_12/api/coordination/v1beta1/mod.rs +++ b/src/v1_12/api/coordination/v1beta1/mod.rs @@ -1,25 +1,19 @@ mod lease; -pub use self::lease::{ - Lease, - CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse, - DeleteCollectionNamespacedLeaseResponse, - DeleteNamespacedLeaseResponse, - ListLeaseForAllNamespacesResponse, - ListNamespacedLeaseResponse, - PatchNamespacedLeaseResponse, - ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse, - ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse, - WatchLeaseForAllNamespacesResponse, - WatchNamespacedLeaseResponse, -}; +pub use self::lease::Lease; +#[cfg(feature = "api")] pub use self::lease::{CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::DeleteCollectionNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::DeleteNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::ListLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::ListNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::PatchNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::{ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::{ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::WatchLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::WatchNamespacedLeaseResponse; mod lease_list; -pub use self::lease_list::{ - LeaseList, -}; +pub use self::lease_list::LeaseList; mod lease_spec; -pub use self::lease_spec::{ - LeaseSpec, -}; +pub use self::lease_spec::LeaseSpec; diff --git a/src/v1_12/api/core/v1/binding.rs b/src/v1_12/api/core/v1/binding.rs index 6231bbed73..bb7a86eab4 100644 --- a/src/v1_12/api/core/v1/binding.rs +++ b/src/v1_12/api/core/v1/binding.rs @@ -30,6 +30,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_binding( namespace: &str, body: &crate::v1_12::api::core::v1::Binding, @@ -66,6 +67,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedBindingResponse { Ok(crate::v1_12::api::core::v1::Binding), @@ -85,6 +88,7 @@ pub enum CreateNamespacedBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -152,6 +156,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_binding( name: &str, namespace: &str, @@ -190,6 +195,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -201,6 +207,7 @@ pub struct CreateNamespacedPodBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodBindingResponse { Ok(crate::v1_12::api::core::v1::Binding), @@ -209,6 +216,7 @@ pub enum CreateNamespacedPodBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/component_status.rs b/src/v1_12/api/core/v1/component_status.rs index c551f9a791..f3e78bd9c8 100644 --- a/src/v1_12/api/core/v1/component_status.rs +++ b/src/v1_12/api/core/v1/component_status.rs @@ -26,6 +26,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_component_status( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -44,12 +45,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::list_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListComponentStatusResponse { Ok(crate::v1_12::api::core::v1::ComponentStatusList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -95,6 +98,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_component_status( name: &str, optional: ReadComponentStatusOptional<'_>, @@ -121,6 +125,7 @@ impl ComponentStatus { } /// Optional parameters of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadComponentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -128,12 +133,14 @@ pub struct ReadComponentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadComponentStatusResponse { Ok(crate::v1_12::api::core::v1::ComponentStatus), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -177,6 +184,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_component_status( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -195,12 +203,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::watch_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchComponentStatusResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/config_map.rs b/src/v1_12/api/core/v1/config_map.rs index 5009bd4b1a..2c93f35875 100644 --- a/src/v1_12/api/core/v1/config_map.rs +++ b/src/v1_12/api/core/v1/config_map.rs @@ -33,6 +33,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_config_map( namespace: &str, body: &crate::v1_12::api::core::v1::ConfigMap, @@ -69,6 +70,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedConfigMapOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedConfigMapResponse { Ok(crate::v1_12::api::core::v1::ConfigMap), @@ -88,6 +91,7 @@ pub enum CreateNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ConfigMap { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_config_map( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_collection_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedConfigMapResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_config_map( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedConfigMapResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_config_map_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListConfigMapForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_config_map( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedConfigMapResponse { Ok(crate::v1_12::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_config_map( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::patch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedConfigMapResponse { Ok(crate::v1_12::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_config_map( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedConfigMapOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -618,12 +639,14 @@ pub struct ReadNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedConfigMapResponse { Ok(crate::v1_12::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_config_map( name: &str, namespace: &str, @@ -709,6 +733,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedConfigMapOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -718,6 +743,7 @@ pub struct ReplaceNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedConfigMapResponse { Ok(crate::v1_12::api::core::v1::ConfigMap), @@ -725,6 +751,7 @@ pub enum ReplaceNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -776,6 +803,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_config_map_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -794,12 +822,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchConfigMapForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_config_map( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -870,12 +901,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedConfigMapResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/endpoints.rs b/src/v1_12/api/core/v1/endpoints.rs index 4da42b0adc..4478696aab 100644 --- a/src/v1_12/api/core/v1/endpoints.rs +++ b/src/v1_12/api/core/v1/endpoints.rs @@ -41,6 +41,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_endpoints( namespace: &str, body: &crate::v1_12::api::core::v1::Endpoints, @@ -77,6 +78,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEndpointsOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -88,6 +90,7 @@ pub struct CreateNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEndpointsResponse { Ok(crate::v1_12::api::core::v1::Endpoints), @@ -96,6 +99,7 @@ pub enum CreateNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -161,6 +165,7 @@ impl Endpoints { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_endpoints( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -184,6 +189,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_collection_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEndpointsResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -191,6 +197,7 @@ pub enum DeleteCollectionNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -253,6 +260,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_endpoints( name: &str, namespace: &str, @@ -274,6 +282,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEndpointsResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -282,6 +291,7 @@ pub enum DeleteNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -346,6 +356,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_endpoints_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -364,12 +375,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEndpointsForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -417,6 +430,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_endpoints( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -438,12 +452,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEndpointsResponse { Ok(crate::v1_12::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -495,6 +511,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_endpoints( name: &str, namespace: &str, @@ -524,12 +541,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::patch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEndpointsResponse { Ok(crate::v1_12::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -579,6 +598,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_endpoints( name: &str, namespace: &str, @@ -615,6 +635,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEndpointsOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -626,12 +647,14 @@ pub struct ReadNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEndpointsResponse { Ok(crate::v1_12::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -683,6 +706,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_endpoints( name: &str, namespace: &str, @@ -717,6 +741,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEndpointsOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -726,6 +751,7 @@ pub struct ReplaceNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEndpointsResponse { Ok(crate::v1_12::api::core::v1::Endpoints), @@ -733,6 +759,7 @@ pub enum ReplaceNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -784,6 +811,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_endpoints_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -802,12 +830,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEndpointsForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -857,6 +887,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_endpoints( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -878,12 +909,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEndpointsResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/event.rs b/src/v1_12/api/core/v1/event.rs index a29de2e258..755298ec34 100644 --- a/src/v1_12/api/core/v1/event.rs +++ b/src/v1_12/api/core/v1/event.rs @@ -69,6 +69,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_12::api::core::v1::Event, @@ -105,6 +106,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -116,6 +118,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_12::api::core::v1::Event), @@ -124,6 +127,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -189,6 +193,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -212,6 +217,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -219,6 +225,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -281,6 +288,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -302,6 +310,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -310,6 +319,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -374,6 +384,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -392,12 +403,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +458,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -466,12 +480,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_12::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -523,6 +539,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -552,12 +569,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_12::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -607,6 +626,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -643,6 +663,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -654,12 +675,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_12::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -711,6 +734,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -745,6 +769,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -754,6 +779,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_12::api::core::v1::Event), @@ -761,6 +787,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +839,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -830,12 +858,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -885,6 +915,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -906,12 +937,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/limit_range.rs b/src/v1_12/api/core/v1/limit_range.rs index da276c719f..221bb4a02a 100644 --- a/src/v1_12/api/core/v1/limit_range.rs +++ b/src/v1_12/api/core/v1/limit_range.rs @@ -30,6 +30,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_limit_range( namespace: &str, body: &crate::v1_12::api::core::v1::LimitRange, @@ -66,6 +67,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLimitRangeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLimitRangeResponse { Ok(crate::v1_12::api::core::v1::LimitRange), @@ -85,6 +88,7 @@ pub enum CreateNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl LimitRange { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_limit_range( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_collection_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLimitRangeResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_limit_range( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLimitRangeResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_limit_range_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLimitRangeForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_limit_range( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -427,12 +441,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLimitRangeResponse { Ok(crate::v1_12::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_limit_range( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::patch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLimitRangeResponse { Ok(crate::v1_12::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_limit_range( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLimitRangeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -615,12 +636,14 @@ pub struct ReadNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLimitRangeResponse { Ok(crate::v1_12::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_limit_range( name: &str, namespace: &str, @@ -706,6 +730,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLimitRangeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -715,6 +740,7 @@ pub struct ReplaceNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLimitRangeResponse { Ok(crate::v1_12::api::core::v1::LimitRange), @@ -722,6 +748,7 @@ pub enum ReplaceNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -773,6 +800,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_limit_range_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -791,12 +819,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLimitRangeForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -846,6 +876,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_limit_range( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -867,12 +898,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLimitRangeResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/mod.rs b/src/v1_12/api/core/v1/mod.rs index 5d6037b308..39423f7911 100644 --- a/src/v1_12/api/core/v1/mod.rs +++ b/src/v1_12/api/core/v1/mod.rs @@ -1,1094 +1,740 @@ mod aws_elastic_block_store_volume_source; -pub use self::aws_elastic_block_store_volume_source::{ - AWSElasticBlockStoreVolumeSource, -}; +pub use self::aws_elastic_block_store_volume_source::AWSElasticBlockStoreVolumeSource; mod affinity; -pub use self::affinity::{ - Affinity, -}; +pub use self::affinity::Affinity; mod attached_volume; -pub use self::attached_volume::{ - AttachedVolume, -}; +pub use self::attached_volume::AttachedVolume; mod azure_disk_volume_source; -pub use self::azure_disk_volume_source::{ - AzureDiskVolumeSource, -}; +pub use self::azure_disk_volume_source::AzureDiskVolumeSource; mod azure_file_persistent_volume_source; -pub use self::azure_file_persistent_volume_source::{ - AzureFilePersistentVolumeSource, -}; +pub use self::azure_file_persistent_volume_source::AzureFilePersistentVolumeSource; mod azure_file_volume_source; -pub use self::azure_file_volume_source::{ - AzureFileVolumeSource, -}; +pub use self::azure_file_volume_source::AzureFileVolumeSource; mod binding; -pub use self::binding::{ - Binding, - CreateNamespacedBindingOptional, CreateNamespacedBindingResponse, - CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse, -}; +pub use self::binding::Binding; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedBindingOptional, CreateNamespacedBindingResponse}; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse}; mod csi_persistent_volume_source; -pub use self::csi_persistent_volume_source::{ - CSIPersistentVolumeSource, -}; +pub use self::csi_persistent_volume_source::CSIPersistentVolumeSource; mod capabilities; -pub use self::capabilities::{ - Capabilities, -}; +pub use self::capabilities::Capabilities; mod ceph_fs_persistent_volume_source; -pub use self::ceph_fs_persistent_volume_source::{ - CephFSPersistentVolumeSource, -}; +pub use self::ceph_fs_persistent_volume_source::CephFSPersistentVolumeSource; mod ceph_fs_volume_source; -pub use self::ceph_fs_volume_source::{ - CephFSVolumeSource, -}; +pub use self::ceph_fs_volume_source::CephFSVolumeSource; mod cinder_persistent_volume_source; -pub use self::cinder_persistent_volume_source::{ - CinderPersistentVolumeSource, -}; +pub use self::cinder_persistent_volume_source::CinderPersistentVolumeSource; mod cinder_volume_source; -pub use self::cinder_volume_source::{ - CinderVolumeSource, -}; +pub use self::cinder_volume_source::CinderVolumeSource; mod client_ip_config; -pub use self::client_ip_config::{ - ClientIPConfig, -}; +pub use self::client_ip_config::ClientIPConfig; mod component_condition; -pub use self::component_condition::{ - ComponentCondition, -}; +pub use self::component_condition::ComponentCondition; mod component_status; -pub use self::component_status::{ - ComponentStatus, - ListComponentStatusResponse, - ReadComponentStatusOptional, ReadComponentStatusResponse, - WatchComponentStatusResponse, -}; +pub use self::component_status::ComponentStatus; +#[cfg(feature = "api")] pub use self::component_status::ListComponentStatusResponse; +#[cfg(feature = "api")] pub use self::component_status::{ReadComponentStatusOptional, ReadComponentStatusResponse}; +#[cfg(feature = "api")] pub use self::component_status::WatchComponentStatusResponse; mod component_status_list; -pub use self::component_status_list::{ - ComponentStatusList, -}; +pub use self::component_status_list::ComponentStatusList; mod config_map; -pub use self::config_map::{ - ConfigMap, - CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse, - DeleteCollectionNamespacedConfigMapResponse, - DeleteNamespacedConfigMapResponse, - ListConfigMapForAllNamespacesResponse, - ListNamespacedConfigMapResponse, - PatchNamespacedConfigMapResponse, - ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse, - ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse, - WatchConfigMapForAllNamespacesResponse, - WatchNamespacedConfigMapResponse, -}; +pub use self::config_map::ConfigMap; +#[cfg(feature = "api")] pub use self::config_map::{CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::DeleteCollectionNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::DeleteNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::ListConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::ListNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::PatchNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::{ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::{ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::WatchConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::WatchNamespacedConfigMapResponse; mod config_map_env_source; -pub use self::config_map_env_source::{ - ConfigMapEnvSource, -}; +pub use self::config_map_env_source::ConfigMapEnvSource; mod config_map_key_selector; -pub use self::config_map_key_selector::{ - ConfigMapKeySelector, -}; +pub use self::config_map_key_selector::ConfigMapKeySelector; mod config_map_list; -pub use self::config_map_list::{ - ConfigMapList, -}; +pub use self::config_map_list::ConfigMapList; mod config_map_node_config_source; -pub use self::config_map_node_config_source::{ - ConfigMapNodeConfigSource, -}; +pub use self::config_map_node_config_source::ConfigMapNodeConfigSource; mod config_map_projection; -pub use self::config_map_projection::{ - ConfigMapProjection, -}; +pub use self::config_map_projection::ConfigMapProjection; mod config_map_volume_source; -pub use self::config_map_volume_source::{ - ConfigMapVolumeSource, -}; +pub use self::config_map_volume_source::ConfigMapVolumeSource; mod container; -pub use self::container::{ - Container, -}; +pub use self::container::Container; mod container_image; -pub use self::container_image::{ - ContainerImage, -}; +pub use self::container_image::ContainerImage; mod container_port; -pub use self::container_port::{ - ContainerPort, -}; +pub use self::container_port::ContainerPort; mod container_state; -pub use self::container_state::{ - ContainerState, -}; +pub use self::container_state::ContainerState; mod container_state_running; -pub use self::container_state_running::{ - ContainerStateRunning, -}; +pub use self::container_state_running::ContainerStateRunning; mod container_state_terminated; -pub use self::container_state_terminated::{ - ContainerStateTerminated, -}; +pub use self::container_state_terminated::ContainerStateTerminated; mod container_state_waiting; -pub use self::container_state_waiting::{ - ContainerStateWaiting, -}; +pub use self::container_state_waiting::ContainerStateWaiting; mod container_status; -pub use self::container_status::{ - ContainerStatus, -}; +pub use self::container_status::ContainerStatus; mod daemon_endpoint; -pub use self::daemon_endpoint::{ - DaemonEndpoint, -}; +pub use self::daemon_endpoint::DaemonEndpoint; mod downward_api_projection; -pub use self::downward_api_projection::{ - DownwardAPIProjection, -}; +pub use self::downward_api_projection::DownwardAPIProjection; mod downward_api_volume_file; -pub use self::downward_api_volume_file::{ - DownwardAPIVolumeFile, -}; +pub use self::downward_api_volume_file::DownwardAPIVolumeFile; mod downward_api_volume_source; -pub use self::downward_api_volume_source::{ - DownwardAPIVolumeSource, -}; +pub use self::downward_api_volume_source::DownwardAPIVolumeSource; mod empty_dir_volume_source; -pub use self::empty_dir_volume_source::{ - EmptyDirVolumeSource, -}; +pub use self::empty_dir_volume_source::EmptyDirVolumeSource; mod endpoint_address; -pub use self::endpoint_address::{ - EndpointAddress, -}; +pub use self::endpoint_address::EndpointAddress; mod endpoint_port; -pub use self::endpoint_port::{ - EndpointPort, -}; +pub use self::endpoint_port::EndpointPort; mod endpoint_subset; -pub use self::endpoint_subset::{ - EndpointSubset, -}; +pub use self::endpoint_subset::EndpointSubset; mod endpoints; -pub use self::endpoints::{ - Endpoints, - CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse, - DeleteCollectionNamespacedEndpointsResponse, - DeleteNamespacedEndpointsResponse, - ListEndpointsForAllNamespacesResponse, - ListNamespacedEndpointsResponse, - PatchNamespacedEndpointsResponse, - ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse, - ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse, - WatchEndpointsForAllNamespacesResponse, - WatchNamespacedEndpointsResponse, -}; +pub use self::endpoints::Endpoints; +#[cfg(feature = "api")] pub use self::endpoints::{CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::DeleteCollectionNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::DeleteNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::PatchNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::{ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::{ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::WatchEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::WatchNamespacedEndpointsResponse; mod endpoints_list; -pub use self::endpoints_list::{ - EndpointsList, -}; +pub use self::endpoints_list::EndpointsList; mod env_from_source; -pub use self::env_from_source::{ - EnvFromSource, -}; +pub use self::env_from_source::EnvFromSource; mod env_var; -pub use self::env_var::{ - EnvVar, -}; +pub use self::env_var::EnvVar; mod env_var_source; -pub use self::env_var_source::{ - EnvVarSource, -}; +pub use self::env_var_source::EnvVarSource; mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; mod event_source; -pub use self::event_source::{ - EventSource, -}; +pub use self::event_source::EventSource; mod exec_action; -pub use self::exec_action::{ - ExecAction, -}; +pub use self::exec_action::ExecAction; mod fc_volume_source; -pub use self::fc_volume_source::{ - FCVolumeSource, -}; +pub use self::fc_volume_source::FCVolumeSource; mod flex_persistent_volume_source; -pub use self::flex_persistent_volume_source::{ - FlexPersistentVolumeSource, -}; +pub use self::flex_persistent_volume_source::FlexPersistentVolumeSource; mod flex_volume_source; -pub use self::flex_volume_source::{ - FlexVolumeSource, -}; +pub use self::flex_volume_source::FlexVolumeSource; mod flocker_volume_source; -pub use self::flocker_volume_source::{ - FlockerVolumeSource, -}; +pub use self::flocker_volume_source::FlockerVolumeSource; mod gce_persistent_disk_volume_source; -pub use self::gce_persistent_disk_volume_source::{ - GCEPersistentDiskVolumeSource, -}; +pub use self::gce_persistent_disk_volume_source::GCEPersistentDiskVolumeSource; mod git_repo_volume_source; -pub use self::git_repo_volume_source::{ - GitRepoVolumeSource, -}; +pub use self::git_repo_volume_source::GitRepoVolumeSource; mod glusterfs_volume_source; -pub use self::glusterfs_volume_source::{ - GlusterfsVolumeSource, -}; +pub use self::glusterfs_volume_source::GlusterfsVolumeSource; mod http_get_action; -pub use self::http_get_action::{ - HTTPGetAction, -}; +pub use self::http_get_action::HTTPGetAction; mod http_header; -pub use self::http_header::{ - HTTPHeader, -}; +pub use self::http_header::HTTPHeader; mod handler; -pub use self::handler::{ - Handler, -}; +pub use self::handler::Handler; mod host_alias; -pub use self::host_alias::{ - HostAlias, -}; +pub use self::host_alias::HostAlias; mod host_path_volume_source; -pub use self::host_path_volume_source::{ - HostPathVolumeSource, -}; +pub use self::host_path_volume_source::HostPathVolumeSource; mod iscsi_persistent_volume_source; -pub use self::iscsi_persistent_volume_source::{ - ISCSIPersistentVolumeSource, -}; +pub use self::iscsi_persistent_volume_source::ISCSIPersistentVolumeSource; mod iscsi_volume_source; -pub use self::iscsi_volume_source::{ - ISCSIVolumeSource, -}; +pub use self::iscsi_volume_source::ISCSIVolumeSource; mod key_to_path; -pub use self::key_to_path::{ - KeyToPath, -}; +pub use self::key_to_path::KeyToPath; mod lifecycle; -pub use self::lifecycle::{ - Lifecycle, -}; +pub use self::lifecycle::Lifecycle; mod limit_range; -pub use self::limit_range::{ - LimitRange, - CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse, - DeleteCollectionNamespacedLimitRangeResponse, - DeleteNamespacedLimitRangeResponse, - ListLimitRangeForAllNamespacesResponse, - ListNamespacedLimitRangeResponse, - PatchNamespacedLimitRangeResponse, - ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse, - ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse, - WatchLimitRangeForAllNamespacesResponse, - WatchNamespacedLimitRangeResponse, -}; +pub use self::limit_range::LimitRange; +#[cfg(feature = "api")] pub use self::limit_range::{CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::DeleteCollectionNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::DeleteNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::PatchNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::{ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::{ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::WatchLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::WatchNamespacedLimitRangeResponse; mod limit_range_item; -pub use self::limit_range_item::{ - LimitRangeItem, -}; +pub use self::limit_range_item::LimitRangeItem; mod limit_range_list; -pub use self::limit_range_list::{ - LimitRangeList, -}; +pub use self::limit_range_list::LimitRangeList; mod limit_range_spec; -pub use self::limit_range_spec::{ - LimitRangeSpec, -}; +pub use self::limit_range_spec::LimitRangeSpec; mod load_balancer_ingress; -pub use self::load_balancer_ingress::{ - LoadBalancerIngress, -}; +pub use self::load_balancer_ingress::LoadBalancerIngress; mod load_balancer_status; -pub use self::load_balancer_status::{ - LoadBalancerStatus, -}; +pub use self::load_balancer_status::LoadBalancerStatus; mod local_object_reference; -pub use self::local_object_reference::{ - LocalObjectReference, -}; +pub use self::local_object_reference::LocalObjectReference; mod local_volume_source; -pub use self::local_volume_source::{ - LocalVolumeSource, -}; +pub use self::local_volume_source::LocalVolumeSource; mod nfs_volume_source; -pub use self::nfs_volume_source::{ - NFSVolumeSource, -}; +pub use self::nfs_volume_source::NFSVolumeSource; mod namespace; -pub use self::namespace::{ - Namespace, - CreateNamespaceOptional, CreateNamespaceResponse, - DeleteNamespaceResponse, - ListNamespaceResponse, - PatchNamespaceResponse, - PatchNamespaceStatusResponse, - ReadNamespaceOptional, ReadNamespaceResponse, - ReadNamespaceStatusOptional, ReadNamespaceStatusResponse, - ReplaceNamespaceOptional, ReplaceNamespaceResponse, - ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse, - ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse, - WatchNamespaceResponse, -}; +pub use self::namespace::Namespace; +#[cfg(feature = "api")] pub use self::namespace::{CreateNamespaceOptional, CreateNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::DeleteNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::ListNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceStatusResponse; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceOptional, ReadNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceStatusOptional, ReadNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceOptional, ReplaceNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::WatchNamespaceResponse; mod namespace_list; -pub use self::namespace_list::{ - NamespaceList, -}; +pub use self::namespace_list::NamespaceList; mod namespace_spec; -pub use self::namespace_spec::{ - NamespaceSpec, -}; +pub use self::namespace_spec::NamespaceSpec; mod namespace_status; -pub use self::namespace_status::{ - NamespaceStatus, -}; +pub use self::namespace_status::NamespaceStatus; mod node; -pub use self::node::{ - Node, - ConnectDeleteNodeProxyOptional, - ConnectDeleteNodeProxyWithPathOptional, - ConnectGetNodeProxyOptional, - ConnectGetNodeProxyWithPathOptional, - ConnectPatchNodeProxyOptional, - ConnectPatchNodeProxyWithPathOptional, - ConnectPostNodeProxyOptional, - ConnectPostNodeProxyWithPathOptional, - ConnectPutNodeProxyOptional, - ConnectPutNodeProxyWithPathOptional, - CreateNodeOptional, CreateNodeResponse, - DeleteCollectionNodeResponse, - DeleteNodeResponse, - ListNodeResponse, - PatchNodeResponse, - PatchNodeStatusResponse, - ReadNodeOptional, ReadNodeResponse, - ReadNodeStatusOptional, ReadNodeStatusResponse, - ReplaceNodeOptional, ReplaceNodeResponse, - ReplaceNodeStatusOptional, ReplaceNodeStatusResponse, - WatchNodeResponse, -}; +pub use self::node::Node; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::{CreateNodeOptional, CreateNodeResponse}; +#[cfg(feature = "api")] pub use self::node::DeleteCollectionNodeResponse; +#[cfg(feature = "api")] pub use self::node::DeleteNodeResponse; +#[cfg(feature = "api")] pub use self::node::ListNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeStatusResponse; +#[cfg(feature = "api")] pub use self::node::{ReadNodeOptional, ReadNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReadNodeStatusOptional, ReadNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeOptional, ReplaceNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeStatusOptional, ReplaceNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::WatchNodeResponse; mod node_address; -pub use self::node_address::{ - NodeAddress, -}; +pub use self::node_address::NodeAddress; mod node_affinity; -pub use self::node_affinity::{ - NodeAffinity, -}; +pub use self::node_affinity::NodeAffinity; mod node_condition; -pub use self::node_condition::{ - NodeCondition, -}; +pub use self::node_condition::NodeCondition; mod node_config_source; -pub use self::node_config_source::{ - NodeConfigSource, -}; +pub use self::node_config_source::NodeConfigSource; mod node_config_status; -pub use self::node_config_status::{ - NodeConfigStatus, -}; +pub use self::node_config_status::NodeConfigStatus; mod node_daemon_endpoints; -pub use self::node_daemon_endpoints::{ - NodeDaemonEndpoints, -}; +pub use self::node_daemon_endpoints::NodeDaemonEndpoints; mod node_list; -pub use self::node_list::{ - NodeList, -}; +pub use self::node_list::NodeList; mod node_selector; -pub use self::node_selector::{ - NodeSelector, -}; +pub use self::node_selector::NodeSelector; mod node_selector_requirement; -pub use self::node_selector_requirement::{ - NodeSelectorRequirement, -}; +pub use self::node_selector_requirement::NodeSelectorRequirement; mod node_selector_term; -pub use self::node_selector_term::{ - NodeSelectorTerm, -}; +pub use self::node_selector_term::NodeSelectorTerm; mod node_spec; -pub use self::node_spec::{ - NodeSpec, -}; +pub use self::node_spec::NodeSpec; mod node_status; -pub use self::node_status::{ - NodeStatus, -}; +pub use self::node_status::NodeStatus; mod node_system_info; -pub use self::node_system_info::{ - NodeSystemInfo, -}; +pub use self::node_system_info::NodeSystemInfo; mod object_field_selector; -pub use self::object_field_selector::{ - ObjectFieldSelector, -}; +pub use self::object_field_selector::ObjectFieldSelector; mod object_reference; -pub use self::object_reference::{ - ObjectReference, -}; +pub use self::object_reference::ObjectReference; mod persistent_volume; -pub use self::persistent_volume::{ - PersistentVolume, - CreatePersistentVolumeOptional, CreatePersistentVolumeResponse, - DeleteCollectionPersistentVolumeResponse, - DeletePersistentVolumeResponse, - ListPersistentVolumeResponse, - PatchPersistentVolumeResponse, - PatchPersistentVolumeStatusResponse, - ReadPersistentVolumeOptional, ReadPersistentVolumeResponse, - ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse, - ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse, - ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse, - WatchPersistentVolumeResponse, -}; +pub use self::persistent_volume::PersistentVolume; +#[cfg(feature = "api")] pub use self::persistent_volume::{CreatePersistentVolumeOptional, CreatePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::DeleteCollectionPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::DeletePersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::ListPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeOptional, ReadPersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::WatchPersistentVolumeResponse; mod persistent_volume_claim; -pub use self::persistent_volume_claim::{ - PersistentVolumeClaim, - CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse, - DeleteCollectionNamespacedPersistentVolumeClaimResponse, - DeleteNamespacedPersistentVolumeClaimResponse, - ListNamespacedPersistentVolumeClaimResponse, - ListPersistentVolumeClaimForAllNamespacesResponse, - PatchNamespacedPersistentVolumeClaimResponse, - PatchNamespacedPersistentVolumeClaimStatusResponse, - ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse, - ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse, - ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse, - ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse, - WatchNamespacedPersistentVolumeClaimResponse, - WatchPersistentVolumeClaimForAllNamespacesResponse, -}; +pub use self::persistent_volume_claim::PersistentVolumeClaim; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteCollectionNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListPersistentVolumeClaimForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchPersistentVolumeClaimForAllNamespacesResponse; mod persistent_volume_claim_condition; -pub use self::persistent_volume_claim_condition::{ - PersistentVolumeClaimCondition, -}; +pub use self::persistent_volume_claim_condition::PersistentVolumeClaimCondition; mod persistent_volume_claim_list; -pub use self::persistent_volume_claim_list::{ - PersistentVolumeClaimList, -}; +pub use self::persistent_volume_claim_list::PersistentVolumeClaimList; mod persistent_volume_claim_spec; -pub use self::persistent_volume_claim_spec::{ - PersistentVolumeClaimSpec, -}; +pub use self::persistent_volume_claim_spec::PersistentVolumeClaimSpec; mod persistent_volume_claim_status; -pub use self::persistent_volume_claim_status::{ - PersistentVolumeClaimStatus, -}; +pub use self::persistent_volume_claim_status::PersistentVolumeClaimStatus; mod persistent_volume_claim_volume_source; -pub use self::persistent_volume_claim_volume_source::{ - PersistentVolumeClaimVolumeSource, -}; +pub use self::persistent_volume_claim_volume_source::PersistentVolumeClaimVolumeSource; mod persistent_volume_list; -pub use self::persistent_volume_list::{ - PersistentVolumeList, -}; +pub use self::persistent_volume_list::PersistentVolumeList; mod persistent_volume_spec; -pub use self::persistent_volume_spec::{ - PersistentVolumeSpec, -}; +pub use self::persistent_volume_spec::PersistentVolumeSpec; mod persistent_volume_status; -pub use self::persistent_volume_status::{ - PersistentVolumeStatus, -}; +pub use self::persistent_volume_status::PersistentVolumeStatus; mod photon_persistent_disk_volume_source; -pub use self::photon_persistent_disk_volume_source::{ - PhotonPersistentDiskVolumeSource, -}; +pub use self::photon_persistent_disk_volume_source::PhotonPersistentDiskVolumeSource; mod pod; -pub use self::pod::{ - Pod, - ConnectDeleteNamespacedPodProxyOptional, - ConnectDeleteNamespacedPodProxyWithPathOptional, - ConnectGetNamespacedPodAttachOptional, - ConnectGetNamespacedPodExecOptional, - ConnectGetNamespacedPodPortforwardOptional, - ConnectGetNamespacedPodProxyOptional, - ConnectGetNamespacedPodProxyWithPathOptional, - ConnectPatchNamespacedPodProxyOptional, - ConnectPatchNamespacedPodProxyWithPathOptional, - ConnectPostNamespacedPodAttachOptional, - ConnectPostNamespacedPodExecOptional, - ConnectPostNamespacedPodPortforwardOptional, - ConnectPostNamespacedPodProxyOptional, - ConnectPostNamespacedPodProxyWithPathOptional, - ConnectPutNamespacedPodProxyOptional, - ConnectPutNamespacedPodProxyWithPathOptional, - CreateNamespacedPodOptional, CreateNamespacedPodResponse, - DeleteCollectionNamespacedPodResponse, - DeleteNamespacedPodResponse, - ListNamespacedPodResponse, - ListPodForAllNamespacesResponse, - PatchNamespacedPodResponse, - PatchNamespacedPodStatusResponse, - ReadNamespacedPodOptional, ReadNamespacedPodResponse, - ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse, - ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse, - ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse, - ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse, - WatchNamespacedPodResponse, - WatchPodForAllNamespacesResponse, -}; +pub use self::pod::Pod; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::{CreateNamespacedPodOptional, CreateNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::DeleteCollectionNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::DeleteNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListPodForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodStatusResponse; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodOptional, ReadNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::WatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::WatchPodForAllNamespacesResponse; mod pod_affinity; -pub use self::pod_affinity::{ - PodAffinity, -}; +pub use self::pod_affinity::PodAffinity; mod pod_affinity_term; -pub use self::pod_affinity_term::{ - PodAffinityTerm, -}; +pub use self::pod_affinity_term::PodAffinityTerm; mod pod_anti_affinity; -pub use self::pod_anti_affinity::{ - PodAntiAffinity, -}; +pub use self::pod_anti_affinity::PodAntiAffinity; mod pod_condition; -pub use self::pod_condition::{ - PodCondition, -}; +pub use self::pod_condition::PodCondition; mod pod_dns_config; -pub use self::pod_dns_config::{ - PodDNSConfig, -}; +pub use self::pod_dns_config::PodDNSConfig; mod pod_dns_config_option; -pub use self::pod_dns_config_option::{ - PodDNSConfigOption, -}; +pub use self::pod_dns_config_option::PodDNSConfigOption; mod pod_list; -pub use self::pod_list::{ - PodList, -}; +pub use self::pod_list::PodList; mod pod_readiness_gate; -pub use self::pod_readiness_gate::{ - PodReadinessGate, -}; +pub use self::pod_readiness_gate::PodReadinessGate; mod pod_security_context; -pub use self::pod_security_context::{ - PodSecurityContext, -}; +pub use self::pod_security_context::PodSecurityContext; mod pod_spec; -pub use self::pod_spec::{ - PodSpec, -}; +pub use self::pod_spec::PodSpec; mod pod_status; -pub use self::pod_status::{ - PodStatus, -}; +pub use self::pod_status::PodStatus; mod pod_template; -pub use self::pod_template::{ - PodTemplate, - CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse, - DeleteCollectionNamespacedPodTemplateResponse, - DeleteNamespacedPodTemplateResponse, - ListNamespacedPodTemplateResponse, - ListPodTemplateForAllNamespacesResponse, - PatchNamespacedPodTemplateResponse, - ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse, - ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse, - WatchNamespacedPodTemplateResponse, - WatchPodTemplateForAllNamespacesResponse, -}; +pub use self::pod_template::PodTemplate; +#[cfg(feature = "api")] pub use self::pod_template::{CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::DeleteCollectionNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::DeleteNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListPodTemplateForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_template::PatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::{ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::{ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::WatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::WatchPodTemplateForAllNamespacesResponse; mod pod_template_list; -pub use self::pod_template_list::{ - PodTemplateList, -}; +pub use self::pod_template_list::PodTemplateList; mod pod_template_spec; -pub use self::pod_template_spec::{ - PodTemplateSpec, -}; +pub use self::pod_template_spec::PodTemplateSpec; mod portworx_volume_source; -pub use self::portworx_volume_source::{ - PortworxVolumeSource, -}; +pub use self::portworx_volume_source::PortworxVolumeSource; mod preferred_scheduling_term; -pub use self::preferred_scheduling_term::{ - PreferredSchedulingTerm, -}; +pub use self::preferred_scheduling_term::PreferredSchedulingTerm; mod probe; -pub use self::probe::{ - Probe, -}; +pub use self::probe::Probe; mod projected_volume_source; -pub use self::projected_volume_source::{ - ProjectedVolumeSource, -}; +pub use self::projected_volume_source::ProjectedVolumeSource; mod quobyte_volume_source; -pub use self::quobyte_volume_source::{ - QuobyteVolumeSource, -}; +pub use self::quobyte_volume_source::QuobyteVolumeSource; mod rbd_persistent_volume_source; -pub use self::rbd_persistent_volume_source::{ - RBDPersistentVolumeSource, -}; +pub use self::rbd_persistent_volume_source::RBDPersistentVolumeSource; mod rbd_volume_source; -pub use self::rbd_volume_source::{ - RBDVolumeSource, -}; +pub use self::rbd_volume_source::RBDVolumeSource; mod replication_controller; -pub use self::replication_controller::{ - ReplicationController, - CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse, - DeleteCollectionNamespacedReplicationControllerResponse, - DeleteNamespacedReplicationControllerResponse, - ListNamespacedReplicationControllerResponse, - ListReplicationControllerForAllNamespacesResponse, - PatchNamespacedReplicationControllerResponse, - PatchNamespacedReplicationControllerStatusResponse, - ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse, - ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse, - ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse, - ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse, - WatchNamespacedReplicationControllerResponse, - WatchReplicationControllerForAllNamespacesResponse, -}; +pub use self::replication_controller::ReplicationController; +#[cfg(feature = "api")] pub use self::replication_controller::{CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteCollectionNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListReplicationControllerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerStatusResponse; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::WatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::WatchReplicationControllerForAllNamespacesResponse; mod replication_controller_condition; -pub use self::replication_controller_condition::{ - ReplicationControllerCondition, -}; +pub use self::replication_controller_condition::ReplicationControllerCondition; mod replication_controller_list; -pub use self::replication_controller_list::{ - ReplicationControllerList, -}; +pub use self::replication_controller_list::ReplicationControllerList; mod replication_controller_spec; -pub use self::replication_controller_spec::{ - ReplicationControllerSpec, -}; +pub use self::replication_controller_spec::ReplicationControllerSpec; mod replication_controller_status; -pub use self::replication_controller_status::{ - ReplicationControllerStatus, -}; +pub use self::replication_controller_status::ReplicationControllerStatus; mod resource_field_selector; -pub use self::resource_field_selector::{ - ResourceFieldSelector, -}; +pub use self::resource_field_selector::ResourceFieldSelector; mod resource_quota; -pub use self::resource_quota::{ - ResourceQuota, - CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse, - DeleteCollectionNamespacedResourceQuotaResponse, - DeleteNamespacedResourceQuotaResponse, - ListNamespacedResourceQuotaResponse, - ListResourceQuotaForAllNamespacesResponse, - PatchNamespacedResourceQuotaResponse, - PatchNamespacedResourceQuotaStatusResponse, - ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse, - ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse, - ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse, - ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse, - WatchNamespacedResourceQuotaResponse, - WatchResourceQuotaForAllNamespacesResponse, -}; +pub use self::resource_quota::ResourceQuota; +#[cfg(feature = "api")] pub use self::resource_quota::{CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteCollectionNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListResourceQuotaForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaStatusResponse; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::WatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::WatchResourceQuotaForAllNamespacesResponse; mod resource_quota_list; -pub use self::resource_quota_list::{ - ResourceQuotaList, -}; +pub use self::resource_quota_list::ResourceQuotaList; mod resource_quota_spec; -pub use self::resource_quota_spec::{ - ResourceQuotaSpec, -}; +pub use self::resource_quota_spec::ResourceQuotaSpec; mod resource_quota_status; -pub use self::resource_quota_status::{ - ResourceQuotaStatus, -}; +pub use self::resource_quota_status::ResourceQuotaStatus; mod resource_requirements; -pub use self::resource_requirements::{ - ResourceRequirements, -}; +pub use self::resource_requirements::ResourceRequirements; mod se_linux_options; -pub use self::se_linux_options::{ - SELinuxOptions, -}; +pub use self::se_linux_options::SELinuxOptions; mod scale_io_persistent_volume_source; -pub use self::scale_io_persistent_volume_source::{ - ScaleIOPersistentVolumeSource, -}; +pub use self::scale_io_persistent_volume_source::ScaleIOPersistentVolumeSource; mod scale_io_volume_source; -pub use self::scale_io_volume_source::{ - ScaleIOVolumeSource, -}; +pub use self::scale_io_volume_source::ScaleIOVolumeSource; mod scope_selector; -pub use self::scope_selector::{ - ScopeSelector, -}; +pub use self::scope_selector::ScopeSelector; mod scoped_resource_selector_requirement; -pub use self::scoped_resource_selector_requirement::{ - ScopedResourceSelectorRequirement, -}; +pub use self::scoped_resource_selector_requirement::ScopedResourceSelectorRequirement; mod secret; -pub use self::secret::{ - Secret, - CreateNamespacedSecretOptional, CreateNamespacedSecretResponse, - DeleteCollectionNamespacedSecretResponse, - DeleteNamespacedSecretResponse, - ListNamespacedSecretResponse, - ListSecretForAllNamespacesResponse, - PatchNamespacedSecretResponse, - ReadNamespacedSecretOptional, ReadNamespacedSecretResponse, - ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse, - WatchNamespacedSecretResponse, - WatchSecretForAllNamespacesResponse, -}; +pub use self::secret::Secret; +#[cfg(feature = "api")] pub use self::secret::{CreateNamespacedSecretOptional, CreateNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::DeleteCollectionNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::DeleteNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListSecretForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::secret::PatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::{ReadNamespacedSecretOptional, ReadNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::{ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::WatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::WatchSecretForAllNamespacesResponse; mod secret_env_source; -pub use self::secret_env_source::{ - SecretEnvSource, -}; +pub use self::secret_env_source::SecretEnvSource; mod secret_key_selector; -pub use self::secret_key_selector::{ - SecretKeySelector, -}; +pub use self::secret_key_selector::SecretKeySelector; mod secret_list; -pub use self::secret_list::{ - SecretList, -}; +pub use self::secret_list::SecretList; mod secret_projection; -pub use self::secret_projection::{ - SecretProjection, -}; +pub use self::secret_projection::SecretProjection; mod secret_reference; -pub use self::secret_reference::{ - SecretReference, -}; +pub use self::secret_reference::SecretReference; mod secret_volume_source; -pub use self::secret_volume_source::{ - SecretVolumeSource, -}; +pub use self::secret_volume_source::SecretVolumeSource; mod security_context; -pub use self::security_context::{ - SecurityContext, -}; +pub use self::security_context::SecurityContext; mod service; -pub use self::service::{ - Service, - ConnectDeleteNamespacedServiceProxyOptional, - ConnectDeleteNamespacedServiceProxyWithPathOptional, - ConnectGetNamespacedServiceProxyOptional, - ConnectGetNamespacedServiceProxyWithPathOptional, - ConnectPatchNamespacedServiceProxyOptional, - ConnectPatchNamespacedServiceProxyWithPathOptional, - ConnectPostNamespacedServiceProxyOptional, - ConnectPostNamespacedServiceProxyWithPathOptional, - ConnectPutNamespacedServiceProxyOptional, - ConnectPutNamespacedServiceProxyWithPathOptional, - CreateNamespacedServiceOptional, CreateNamespacedServiceResponse, - DeleteNamespacedServiceResponse, - ListNamespacedServiceResponse, - ListServiceForAllNamespacesResponse, - PatchNamespacedServiceResponse, - PatchNamespacedServiceStatusResponse, - ReadNamespacedServiceOptional, ReadNamespacedServiceResponse, - ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse, - ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse, - ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse, - WatchNamespacedServiceResponse, - WatchServiceForAllNamespacesResponse, -}; +pub use self::service::Service; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::{CreateNamespacedServiceOptional, CreateNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::DeleteNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListServiceForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceStatusResponse; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceOptional, ReadNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::WatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::WatchServiceForAllNamespacesResponse; mod service_account; -pub use self::service_account::{ - ServiceAccount, - CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse, - DeleteCollectionNamespacedServiceAccountResponse, - DeleteNamespacedServiceAccountResponse, - ListNamespacedServiceAccountResponse, - ListServiceAccountForAllNamespacesResponse, - PatchNamespacedServiceAccountResponse, - ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse, - ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse, - WatchNamespacedServiceAccountResponse, - WatchServiceAccountForAllNamespacesResponse, -}; +pub use self::service_account::ServiceAccount; +#[cfg(feature = "api")] pub use self::service_account::{CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::DeleteCollectionNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::DeleteNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListServiceAccountForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service_account::PatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::{ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::{ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::WatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::WatchServiceAccountForAllNamespacesResponse; mod service_account_list; -pub use self::service_account_list::{ - ServiceAccountList, -}; +pub use self::service_account_list::ServiceAccountList; mod service_account_token_projection; -pub use self::service_account_token_projection::{ - ServiceAccountTokenProjection, -}; +pub use self::service_account_token_projection::ServiceAccountTokenProjection; mod service_list; -pub use self::service_list::{ - ServiceList, -}; +pub use self::service_list::ServiceList; mod service_port; -pub use self::service_port::{ - ServicePort, -}; +pub use self::service_port::ServicePort; mod service_spec; -pub use self::service_spec::{ - ServiceSpec, -}; +pub use self::service_spec::ServiceSpec; mod service_status; -pub use self::service_status::{ - ServiceStatus, -}; +pub use self::service_status::ServiceStatus; mod session_affinity_config; -pub use self::session_affinity_config::{ - SessionAffinityConfig, -}; +pub use self::session_affinity_config::SessionAffinityConfig; mod storage_os_persistent_volume_source; -pub use self::storage_os_persistent_volume_source::{ - StorageOSPersistentVolumeSource, -}; +pub use self::storage_os_persistent_volume_source::StorageOSPersistentVolumeSource; mod storage_os_volume_source; -pub use self::storage_os_volume_source::{ - StorageOSVolumeSource, -}; +pub use self::storage_os_volume_source::StorageOSVolumeSource; mod sysctl; -pub use self::sysctl::{ - Sysctl, -}; +pub use self::sysctl::Sysctl; mod tcp_socket_action; -pub use self::tcp_socket_action::{ - TCPSocketAction, -}; +pub use self::tcp_socket_action::TCPSocketAction; mod taint; -pub use self::taint::{ - Taint, -}; +pub use self::taint::Taint; mod toleration; -pub use self::toleration::{ - Toleration, -}; +pub use self::toleration::Toleration; mod topology_selector_label_requirement; -pub use self::topology_selector_label_requirement::{ - TopologySelectorLabelRequirement, -}; +pub use self::topology_selector_label_requirement::TopologySelectorLabelRequirement; mod topology_selector_term; -pub use self::topology_selector_term::{ - TopologySelectorTerm, -}; +pub use self::topology_selector_term::TopologySelectorTerm; mod typed_local_object_reference; -pub use self::typed_local_object_reference::{ - TypedLocalObjectReference, -}; +pub use self::typed_local_object_reference::TypedLocalObjectReference; mod volume; -pub use self::volume::{ - Volume, -}; +pub use self::volume::Volume; mod volume_device; -pub use self::volume_device::{ - VolumeDevice, -}; +pub use self::volume_device::VolumeDevice; mod volume_mount; -pub use self::volume_mount::{ - VolumeMount, -}; +pub use self::volume_mount::VolumeMount; mod volume_node_affinity; -pub use self::volume_node_affinity::{ - VolumeNodeAffinity, -}; +pub use self::volume_node_affinity::VolumeNodeAffinity; mod volume_projection; -pub use self::volume_projection::{ - VolumeProjection, -}; +pub use self::volume_projection::VolumeProjection; mod vsphere_virtual_disk_volume_source; -pub use self::vsphere_virtual_disk_volume_source::{ - VsphereVirtualDiskVolumeSource, -}; +pub use self::vsphere_virtual_disk_volume_source::VsphereVirtualDiskVolumeSource; mod weighted_pod_affinity_term; -pub use self::weighted_pod_affinity_term::{ - WeightedPodAffinityTerm, -}; +pub use self::weighted_pod_affinity_term::WeightedPodAffinityTerm; diff --git a/src/v1_12/api/core/v1/namespace.rs b/src/v1_12/api/core/v1/namespace.rs index fe1350003c..27dd4a4a1b 100644 --- a/src/v1_12/api/core/v1/namespace.rs +++ b/src/v1_12/api/core/v1/namespace.rs @@ -29,6 +29,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespace( body: &crate::v1_12::api::core::v1::Namespace, optional: CreateNamespaceOptional<'_>, @@ -62,6 +63,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespaceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespaceResponse { Ok(crate::v1_12::api::core::v1::Namespace), @@ -81,6 +84,7 @@ pub enum CreateNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespace( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::delete_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespaceResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespace( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -251,12 +259,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::list_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespaceResponse { Ok(crate::v1_12::api::core::v1::NamespaceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -304,6 +314,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -331,12 +342,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceResponse { Ok(crate::v1_12::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -384,6 +397,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace_status( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -411,12 +425,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceStatusResponse { Ok(crate::v1_12::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -462,6 +478,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace( name: &str, optional: ReadNamespaceOptional<'_>, @@ -496,6 +513,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -507,12 +525,14 @@ pub struct ReadNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceResponse { Ok(crate::v1_12::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -558,6 +578,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace_status( name: &str, optional: ReadNamespaceStatusOptional<'_>, @@ -584,6 +605,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -591,12 +613,14 @@ pub struct ReadNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceStatusResponse { Ok(crate::v1_12::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -644,6 +668,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace( name: &str, body: &crate::v1_12::api::core::v1::Namespace, @@ -676,6 +701,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -685,6 +711,7 @@ pub struct ReplaceNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceResponse { Ok(crate::v1_12::api::core::v1::Namespace), @@ -692,6 +719,7 @@ pub enum ReplaceNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -747,6 +775,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_finalize( name: &str, body: &crate::v1_12::api::core::v1::Namespace, @@ -779,6 +808,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceFinalizeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -788,6 +818,7 @@ pub struct ReplaceNamespaceFinalizeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceFinalizeResponse { Ok(crate::v1_12::api::core::v1::Namespace), @@ -795,6 +826,7 @@ pub enum ReplaceNamespaceFinalizeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceFinalizeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -850,6 +882,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_status( name: &str, body: &crate::v1_12::api::core::v1::Namespace, @@ -882,6 +915,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -891,6 +925,7 @@ pub struct ReplaceNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceStatusResponse { Ok(crate::v1_12::api::core::v1::Namespace), @@ -898,6 +933,7 @@ pub enum ReplaceNamespaceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -949,6 +985,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespace( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -967,12 +1004,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::watch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespaceResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/node.rs b/src/v1_12/api/core/v1/node.rs index 4c7f55e838..ff8a093ea7 100644 --- a/src/v1_12/api/core/v1/node.rs +++ b/src/v1_12/api/core/v1/node.rs @@ -29,6 +29,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy( name: &str, optional: ConnectDeleteNodeProxyOptional<'_>, @@ -52,6 +53,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -76,6 +78,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy_with_path( name: &str, path: &str, @@ -101,6 +104,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -121,6 +125,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy( name: &str, optional: ConnectGetNodeProxyOptional<'_>, @@ -144,6 +149,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -168,6 +174,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy_with_path( name: &str, path: &str, @@ -193,6 +200,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -213,6 +221,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy( name: &str, optional: ConnectPatchNodeProxyOptional<'_>, @@ -236,6 +245,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -260,6 +270,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy_with_path( name: &str, path: &str, @@ -285,6 +296,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -305,6 +317,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy( name: &str, optional: ConnectPostNodeProxyOptional<'_>, @@ -328,6 +341,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -352,6 +366,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy_with_path( name: &str, path: &str, @@ -377,6 +392,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -397,6 +413,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy( name: &str, optional: ConnectPutNodeProxyOptional<'_>, @@ -420,6 +437,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -444,6 +462,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy_with_path( name: &str, path: &str, @@ -469,6 +488,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -489,6 +509,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_node( body: &crate::v1_12::api::core::v1::Node, optional: CreateNodeOptional<'_>, @@ -522,6 +543,7 @@ impl Node { } /// Optional parameters of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -533,6 +555,7 @@ pub struct CreateNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNodeResponse { Ok(crate::v1_12::api::core::v1::Node), @@ -541,6 +564,7 @@ pub enum CreateNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -602,6 +626,7 @@ impl Node { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_node( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -622,6 +647,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_collection_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNodeResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -629,6 +655,7 @@ pub enum DeleteCollectionNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -687,6 +714,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_node( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -706,6 +734,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNodeResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -714,6 +743,7 @@ pub enum DeleteNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -778,6 +808,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_node( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -796,12 +827,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::list_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNodeResponse { Ok(crate::v1_12::api::core::v1::NodeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +882,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -876,12 +910,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeResponse { Ok(crate::v1_12::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -929,6 +965,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node_status( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -956,12 +993,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeStatusResponse { Ok(crate::v1_12::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1007,6 +1046,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node( name: &str, optional: ReadNodeOptional<'_>, @@ -1041,6 +1081,7 @@ impl Node { } /// Optional parameters of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1052,12 +1093,14 @@ pub struct ReadNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeResponse { Ok(crate::v1_12::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1103,6 +1146,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node_status( name: &str, optional: ReadNodeStatusOptional<'_>, @@ -1129,6 +1173,7 @@ impl Node { } /// Optional parameters of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1136,12 +1181,14 @@ pub struct ReadNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeStatusResponse { Ok(crate::v1_12::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1189,6 +1236,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node( name: &str, body: &crate::v1_12::api::core::v1::Node, @@ -1221,6 +1269,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1230,6 +1279,7 @@ pub struct ReplaceNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeResponse { Ok(crate::v1_12::api::core::v1::Node), @@ -1237,6 +1287,7 @@ pub enum ReplaceNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1292,6 +1343,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node_status( name: &str, body: &crate::v1_12::api::core::v1::Node, @@ -1324,6 +1376,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1333,6 +1386,7 @@ pub struct ReplaceNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeStatusResponse { Ok(crate::v1_12::api::core::v1::Node), @@ -1340,6 +1394,7 @@ pub enum ReplaceNodeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1391,6 +1446,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_node( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1409,12 +1465,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::watch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNodeResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/persistent_volume.rs b/src/v1_12/api/core/v1/persistent_volume.rs index 2d9d121221..fa8a2bc057 100644 --- a/src/v1_12/api/core/v1/persistent_volume.rs +++ b/src/v1_12/api/core/v1/persistent_volume.rs @@ -29,6 +29,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_persistent_volume( body: &crate::v1_12::api::core::v1::PersistentVolume, optional: CreatePersistentVolumeOptional<'_>, @@ -62,6 +63,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePersistentVolumeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreatePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePersistentVolumeResponse { Ok(crate::v1_12::api::core::v1::PersistentVolume), @@ -81,6 +84,7 @@ pub enum CreatePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl PersistentVolume { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_persistent_volume( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -162,6 +167,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_collection_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPersistentVolumeResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteCollectionPersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -227,6 +234,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_persistent_volume( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -246,6 +254,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePersistentVolumeResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -254,6 +263,7 @@ pub enum DeletePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::list_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeResponse { Ok(crate::v1_12::api::core::v1::PersistentVolumeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeResponse { Ok(crate::v1_12::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume_status( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -496,12 +513,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeStatusResponse { Ok(crate::v1_12::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume( name: &str, optional: ReadPersistentVolumeOptional<'_>, @@ -581,6 +601,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -592,12 +613,14 @@ pub struct ReadPersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeResponse { Ok(crate::v1_12::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -643,6 +666,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume_status( name: &str, optional: ReadPersistentVolumeStatusOptional<'_>, @@ -669,6 +693,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,12 +701,14 @@ pub struct ReadPersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeStatusResponse { Ok(crate::v1_12::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -729,6 +756,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume( name: &str, body: &crate::v1_12::api::core::v1::PersistentVolume, @@ -761,6 +789,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -770,6 +799,7 @@ pub struct ReplacePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeResponse { Ok(crate::v1_12::api::core::v1::PersistentVolume), @@ -777,6 +807,7 @@ pub enum ReplacePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -832,6 +863,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume_status( name: &str, body: &crate::v1_12::api::core::v1::PersistentVolume, @@ -864,6 +896,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -873,6 +906,7 @@ pub struct ReplacePersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeStatusResponse { Ok(crate::v1_12::api::core::v1::PersistentVolume), @@ -880,6 +914,7 @@ pub enum ReplacePersistentVolumeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -931,6 +966,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -949,12 +985,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::watch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/persistent_volume_claim.rs b/src/v1_12/api/core/v1/persistent_volume_claim.rs index 3adb79ab7a..17186229f9 100644 --- a/src/v1_12/api/core/v1/persistent_volume_claim.rs +++ b/src/v1_12/api/core/v1/persistent_volume_claim.rs @@ -33,6 +33,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_persistent_volume_claim( namespace: &str, body: &crate::v1_12::api::core::v1::PersistentVolumeClaim, @@ -69,6 +70,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_12::api::core::v1::PersistentVolumeClaim), @@ -88,6 +91,7 @@ pub enum CreateNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl PersistentVolumeClaim { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_persistent_volume_claim( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_collection_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -363,12 +374,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_12::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume_claim_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_12::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_12::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_12::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_12::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_12::api::core::v1::PersistentVolumeClaim), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_12::api::core::v1::PersistentVolumeClaim), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume_claim_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/pod.rs b/src/v1_12/api/core/v1/pod.rs index 4802bc7cdf..3b742aaa49 100644 --- a/src/v1_12/api/core/v1/pod.rs +++ b/src/v1_12/api/core/v1/pod.rs @@ -33,6 +33,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -86,6 +88,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -137,6 +141,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_attach( name: &str, namespace: &str, @@ -178,6 +183,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -210,6 +216,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_exec( name: &str, namespace: &str, @@ -255,6 +262,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -289,6 +297,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_portforward( name: &str, namespace: &str, @@ -314,6 +323,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -338,6 +348,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy( name: &str, namespace: &str, @@ -363,6 +374,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -391,6 +403,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -418,6 +431,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -442,6 +456,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy( name: &str, namespace: &str, @@ -467,6 +482,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -495,6 +511,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -522,6 +539,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -546,6 +564,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_attach( name: &str, namespace: &str, @@ -587,6 +606,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -619,6 +639,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_exec( name: &str, namespace: &str, @@ -664,6 +685,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -698,6 +720,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_portforward( name: &str, namespace: &str, @@ -723,6 +746,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -747,6 +771,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy( name: &str, namespace: &str, @@ -772,6 +797,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -800,6 +826,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -827,6 +854,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -851,6 +879,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy( name: &str, namespace: &str, @@ -876,6 +905,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -904,6 +934,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -931,6 +962,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -955,6 +987,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod( namespace: &str, body: &crate::v1_12::api::core::v1::Pod, @@ -991,6 +1024,7 @@ impl Pod { } /// Optional parameters of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1002,6 +1036,7 @@ pub struct CreateNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodResponse { Ok(crate::v1_12::api::core::v1::Pod), @@ -1010,6 +1045,7 @@ pub enum CreateNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1075,6 +1111,7 @@ impl Pod { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -1098,6 +1135,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_collection_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -1105,6 +1143,7 @@ pub enum DeleteCollectionNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1167,6 +1206,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod( name: &str, namespace: &str, @@ -1188,6 +1228,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -1196,6 +1237,7 @@ pub enum DeleteNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1264,6 +1306,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -1285,12 +1328,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodResponse { Ok(crate::v1_12::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1334,6 +1379,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1352,12 +1398,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1409,6 +1457,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod( name: &str, namespace: &str, @@ -1438,12 +1487,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodResponse { Ok(crate::v1_12::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1495,6 +1546,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_status( name: &str, namespace: &str, @@ -1524,12 +1576,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodStatusResponse { Ok(crate::v1_12::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1579,6 +1633,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod( name: &str, namespace: &str, @@ -1615,6 +1670,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1626,12 +1682,14 @@ pub struct ReadNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodResponse { Ok(crate::v1_12::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1681,6 +1739,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_log( name: &str, namespace: &str, @@ -1737,6 +1796,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodLogOptional<'a> { /// The container for which to stream logs. Defaults to only container if there is one container in the pod. @@ -1758,12 +1818,14 @@ pub struct ReadNamespacedPodLogOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodLogResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodLogResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1823,6 +1885,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_status( name: &str, namespace: &str, @@ -1851,6 +1914,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1858,12 +1922,14 @@ pub struct ReadNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodStatusResponse { Ok(crate::v1_12::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1915,6 +1981,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod( name: &str, namespace: &str, @@ -1949,6 +2016,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1958,6 +2026,7 @@ pub struct ReplaceNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodResponse { Ok(crate::v1_12::api::core::v1::Pod), @@ -1965,6 +2034,7 @@ pub enum ReplaceNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2024,6 +2094,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_status( name: &str, namespace: &str, @@ -2058,6 +2129,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -2067,6 +2139,7 @@ pub struct ReplaceNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodStatusResponse { Ok(crate::v1_12::api::core::v1::Pod), @@ -2074,6 +2147,7 @@ pub enum ReplaceNamespacedPodStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2129,6 +2203,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -2150,12 +2225,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2201,6 +2278,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2219,12 +2297,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/pod_template.rs b/src/v1_12/api/core/v1/pod_template.rs index a746b388c0..060d6931a3 100644 --- a/src/v1_12/api/core/v1/pod_template.rs +++ b/src/v1_12/api/core/v1/pod_template.rs @@ -30,6 +30,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_template( namespace: &str, body: &crate::v1_12::api::core::v1::PodTemplate, @@ -66,6 +67,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodTemplateOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodTemplateResponse { Ok(crate::v1_12::api::core::v1::PodTemplate), @@ -85,6 +88,7 @@ pub enum CreateNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl PodTemplate { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_template( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_collection_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodTemplateResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_template( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodTemplateResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_template( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -360,12 +371,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodTemplateResponse { Ok(crate::v1_12::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_template_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodTemplateForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_template( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::patch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodTemplateResponse { Ok(crate::v1_12::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_template( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodTemplateOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -615,12 +636,14 @@ pub struct ReadNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodTemplateResponse { Ok(crate::v1_12::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_template( name: &str, namespace: &str, @@ -706,6 +730,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodTemplateOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -715,6 +740,7 @@ pub struct ReplaceNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodTemplateResponse { Ok(crate::v1_12::api::core::v1::PodTemplate), @@ -722,6 +748,7 @@ pub enum ReplaceNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -777,6 +804,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_template( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -798,12 +826,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodTemplateResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_template_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -867,12 +898,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodTemplateForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/replication_controller.rs b/src/v1_12/api/core/v1/replication_controller.rs index 23d4d85246..2d7e4803ec 100644 --- a/src/v1_12/api/core/v1/replication_controller.rs +++ b/src/v1_12/api/core/v1/replication_controller.rs @@ -33,6 +33,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replication_controller( namespace: &str, body: &crate::v1_12::api::core::v1::ReplicationController, @@ -69,6 +70,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicationControllerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicationControllerResponse { Ok(crate::v1_12::api::core::v1::ReplicationController), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicationController { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replication_controller( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_collection_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicationControllerResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replication_controller( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicationControllerResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replication_controller( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicationControllerResponse { Ok(crate::v1_12::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replication_controller_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicationControllerForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerResponse { Ok(crate::v1_12::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerStatusResponse { Ok(crate::v1_12::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerResponse { Ok(crate::v1_12::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerStatusResponse { Ok(crate::v1_12::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerResponse { Ok(crate::v1_12::api::core::v1::ReplicationController), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerStatusResponse { Ok(crate::v1_12::api::core::v1::ReplicationController), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedReplicationControllerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replication_controller( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicationControllerResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replication_controller_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicationControllerForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/resource_quota.rs b/src/v1_12/api/core/v1/resource_quota.rs index 4f41127bc1..3306a6c2c8 100644 --- a/src/v1_12/api/core/v1/resource_quota.rs +++ b/src/v1_12/api/core/v1/resource_quota.rs @@ -33,6 +33,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_resource_quota( namespace: &str, body: &crate::v1_12::api::core::v1::ResourceQuota, @@ -69,6 +70,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedResourceQuotaOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedResourceQuotaResponse { Ok(crate::v1_12::api::core::v1::ResourceQuota), @@ -88,6 +91,7 @@ pub enum CreateNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ResourceQuota { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_resource_quota( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_collection_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedResourceQuotaResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_resource_quota( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedResourceQuotaResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_resource_quota( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedResourceQuotaResponse { Ok(crate::v1_12::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_resource_quota_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListResourceQuotaForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaResponse { Ok(crate::v1_12::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaStatusResponse { Ok(crate::v1_12::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaResponse { Ok(crate::v1_12::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaStatusResponse { Ok(crate::v1_12::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaResponse { Ok(crate::v1_12::api::core::v1::ResourceQuota), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaStatusResponse { Ok(crate::v1_12::api::core::v1::ResourceQuota), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedResourceQuotaStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_resource_quota( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedResourceQuotaResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_resource_quota_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchResourceQuotaForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/secret.rs b/src/v1_12/api/core/v1/secret.rs index 047087456d..d21792ee7e 100644 --- a/src/v1_12/api/core/v1/secret.rs +++ b/src/v1_12/api/core/v1/secret.rs @@ -36,6 +36,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_secret( namespace: &str, body: &crate::v1_12::api::core::v1::Secret, @@ -72,6 +73,7 @@ impl Secret { } /// Optional parameters of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedSecretOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedSecretResponse { Ok(crate::v1_12::api::core::v1::Secret), @@ -91,6 +94,7 @@ pub enum CreateNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -156,6 +160,7 @@ impl Secret { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_secret( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -179,6 +184,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_collection_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedSecretResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -248,6 +255,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_secret( name: &str, namespace: &str, @@ -269,6 +277,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedSecretResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -277,6 +286,7 @@ pub enum DeleteNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -345,6 +355,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_secret( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -366,12 +377,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedSecretResponse { Ok(crate::v1_12::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -415,6 +428,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_secret_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -433,12 +447,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListSecretForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -490,6 +506,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_secret( name: &str, namespace: &str, @@ -519,12 +536,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::patch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedSecretResponse { Ok(crate::v1_12::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -574,6 +593,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_secret( name: &str, namespace: &str, @@ -610,6 +630,7 @@ impl Secret { } /// Optional parameters of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedSecretOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -621,12 +642,14 @@ pub struct ReadNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedSecretResponse { Ok(crate::v1_12::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -678,6 +701,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_secret( name: &str, namespace: &str, @@ -712,6 +736,7 @@ impl Secret { } /// Optional parameters of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedSecretOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedSecretResponse { Ok(crate::v1_12::api::core::v1::Secret), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +810,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_secret( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -804,12 +832,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedSecretResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_secret_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -873,12 +904,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchSecretForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/service.rs b/src/v1_12/api/core/v1/service.rs index 0008fee66d..e015edadfb 100644 --- a/src/v1_12/api/core/v1/service.rs +++ b/src/v1_12/api/core/v1/service.rs @@ -33,6 +33,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -86,6 +88,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -137,6 +141,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy( name: &str, namespace: &str, @@ -162,6 +167,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -190,6 +196,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -217,6 +224,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -241,6 +249,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy( name: &str, namespace: &str, @@ -266,6 +275,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -294,6 +304,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -321,6 +332,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -345,6 +357,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy( name: &str, namespace: &str, @@ -370,6 +383,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -398,6 +412,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -425,6 +440,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -449,6 +465,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy( name: &str, namespace: &str, @@ -474,6 +491,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -502,6 +520,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -529,6 +548,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -553,6 +573,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service( namespace: &str, body: &crate::v1_12::api::core::v1::Service, @@ -589,6 +610,7 @@ impl Service { } /// Optional parameters of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct CreateNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceResponse { Ok(crate::v1_12::api::core::v1::Service), @@ -608,6 +631,7 @@ pub enum CreateNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -673,6 +697,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service( name: &str, namespace: &str, @@ -694,6 +719,7 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -702,6 +728,7 @@ pub enum DeleteNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -770,6 +797,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -791,12 +819,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceResponse { Ok(crate::v1_12::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +870,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -858,12 +889,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -915,6 +948,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service( name: &str, namespace: &str, @@ -944,12 +978,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceResponse { Ok(crate::v1_12::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1001,6 +1037,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_status( name: &str, namespace: &str, @@ -1030,12 +1067,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceStatusResponse { Ok(crate::v1_12::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1085,6 +1124,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service( name: &str, namespace: &str, @@ -1121,6 +1161,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1132,12 +1173,14 @@ pub struct ReadNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceResponse { Ok(crate::v1_12::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1187,6 +1230,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_status( name: &str, namespace: &str, @@ -1215,6 +1259,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1222,12 +1267,14 @@ pub struct ReadNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceStatusResponse { Ok(crate::v1_12::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1279,6 +1326,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service( name: &str, namespace: &str, @@ -1313,6 +1361,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1322,6 +1371,7 @@ pub struct ReplaceNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceResponse { Ok(crate::v1_12::api::core::v1::Service), @@ -1329,6 +1379,7 @@ pub enum ReplaceNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1388,6 +1439,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_status( name: &str, namespace: &str, @@ -1422,6 +1474,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1431,6 +1484,7 @@ pub struct ReplaceNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceStatusResponse { Ok(crate::v1_12::api::core::v1::Service), @@ -1438,6 +1492,7 @@ pub enum ReplaceNamespacedServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1493,6 +1548,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1514,12 +1570,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1565,6 +1623,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1583,12 +1642,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/core/v1/service_account.rs b/src/v1_12/api/core/v1/service_account.rs index ae48a60831..63c4308fa0 100644 --- a/src/v1_12/api/core/v1/service_account.rs +++ b/src/v1_12/api/core/v1/service_account.rs @@ -36,6 +36,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service_account( namespace: &str, body: &crate::v1_12::api::core::v1::ServiceAccount, @@ -72,6 +73,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceAccountOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceAccountResponse { Ok(crate::v1_12::api::core::v1::ServiceAccount), @@ -91,6 +94,7 @@ pub enum CreateNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -156,6 +160,7 @@ impl ServiceAccount { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_service_account( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -179,6 +184,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_collection_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedServiceAccountResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -248,6 +255,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service_account( name: &str, namespace: &str, @@ -269,6 +277,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceAccountResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -277,6 +286,7 @@ pub enum DeleteNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -345,6 +355,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service_account( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -366,12 +377,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceAccountResponse { Ok(crate::v1_12::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -415,6 +428,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_account_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -433,12 +447,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceAccountForAllNamespacesResponse { Ok(crate::v1_12::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -490,6 +506,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_account( name: &str, namespace: &str, @@ -519,12 +536,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::patch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceAccountResponse { Ok(crate::v1_12::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -574,6 +593,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_account( name: &str, namespace: &str, @@ -610,6 +630,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceAccountOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -621,12 +642,14 @@ pub struct ReadNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceAccountResponse { Ok(crate::v1_12::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -678,6 +701,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_account( name: &str, namespace: &str, @@ -712,6 +736,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceAccountOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceAccountResponse { Ok(crate::v1_12::api::core::v1::ServiceAccount), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +810,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service_account( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -804,12 +832,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceAccountResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_account_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -873,12 +904,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceAccountForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/events/v1beta1/event.rs b/src/v1_12/api/events/v1beta1/event.rs index b0f1c41e06..cf48047a62 100644 --- a/src/v1_12/api/events/v1beta1/event.rs +++ b/src/v1_12/api/events/v1beta1/event.rs @@ -68,6 +68,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_12::api::events::v1beta1::Event, @@ -104,6 +105,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -115,6 +117,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_12::api::events::v1beta1::Event), @@ -123,6 +126,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -188,6 +192,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -211,6 +216,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -218,6 +224,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -280,6 +287,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -301,6 +309,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -309,6 +318,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +383,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +402,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_12::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -444,6 +457,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -465,12 +479,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_12::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -522,6 +538,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -551,12 +568,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_12::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -606,6 +625,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -642,6 +662,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -653,12 +674,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_12::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -710,6 +733,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -744,6 +768,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -753,6 +778,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_12::api::events::v1beta1::Event), @@ -760,6 +786,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -811,6 +838,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -829,12 +857,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -884,6 +914,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -905,12 +936,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/events/v1beta1/mod.rs b/src/v1_12/api/events/v1beta1/mod.rs index 34d0b5bf3a..0029a47de6 100644 --- a/src/v1_12/api/events/v1beta1/mod.rs +++ b/src/v1_12/api/events/v1beta1/mod.rs @@ -1,25 +1,19 @@ mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; diff --git a/src/v1_12/api/extensions/v1beta1/daemon_set.rs b/src/v1_12/api/extensions/v1beta1/daemon_set.rs index 7c22e3b6c0..abc9bd6b69 100644 --- a/src/v1_12/api/extensions/v1beta1/daemon_set.rs +++ b/src/v1_12/api/extensions/v1beta1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_12::api::extensions::v1beta1::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_12::api::extensions::v1beta1::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_12::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_12::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_12::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_12::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_12::api::extensions::v1beta1::DaemonSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::DaemonSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/extensions/v1beta1/deployment.rs b/src/v1_12/api/extensions/v1beta1/deployment.rs index e066a89358..d596d34d37 100644 --- a/src/v1_12/api/extensions/v1beta1/deployment.rs +++ b/src/v1_12/api/extensions/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_12::api::extensions::v1beta1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_12::api::extensions::v1beta1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_12::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_12::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_12::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_12::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_12::api::extensions::v1beta1::Deployment), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::Deployment), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/extensions/v1beta1/deployment_rollback.rs b/src/v1_12/api/extensions/v1beta1/deployment_rollback.rs index 946471595a..a1a2afce17 100644 --- a/src/v1_12/api/extensions/v1beta1/deployment_rollback.rs +++ b/src/v1_12/api/extensions/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -75,6 +76,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -86,6 +88,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -94,6 +97,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/extensions/v1beta1/ingress.rs b/src/v1_12/api/extensions/v1beta1/ingress.rs index 66433c953b..fe3d83f419 100644 --- a/src/v1_12/api/extensions/v1beta1/ingress.rs +++ b/src/v1_12/api/extensions/v1beta1/ingress.rs @@ -33,6 +33,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_ingress( namespace: &str, body: &crate::v1_12::api::extensions::v1beta1::Ingress, @@ -69,6 +70,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedIngressResponse { Ok(crate::v1_12::api::extensions::v1beta1::Ingress), @@ -88,6 +91,7 @@ pub enum CreateNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Ingress { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_ingress( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_collection_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedIngressResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_ingress( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedIngressResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_ingress_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListIngressForAllNamespacesResponse { Ok(crate::v1_12::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_ingress( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedIngressResponse { Ok(crate::v1_12::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressResponse { Ok(crate::v1_12::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressResponse { Ok(crate::v1_12::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressResponse { Ok(crate::v1_12::api::extensions::v1beta1::Ingress), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::Ingress), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedIngressStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_ingress_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchIngressForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_ingress( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedIngressResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/extensions/v1beta1/mod.rs b/src/v1_12/api/extensions/v1beta1/mod.rs index 2ed08add27..d6fdd8c7fa 100644 --- a/src/v1_12/api/extensions/v1beta1/mod.rs +++ b/src/v1_12/api/extensions/v1beta1/mod.rs @@ -1,340 +1,236 @@ mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod http_ingress_path; -pub use self::http_ingress_path::{ - HTTPIngressPath, -}; +pub use self::http_ingress_path::HTTPIngressPath; mod http_ingress_rule_value; -pub use self::http_ingress_rule_value::{ - HTTPIngressRuleValue, -}; +pub use self::http_ingress_rule_value::HTTPIngressRuleValue; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod ingress; -pub use self::ingress::{ - Ingress, - CreateNamespacedIngressOptional, CreateNamespacedIngressResponse, - DeleteCollectionNamespacedIngressResponse, - DeleteNamespacedIngressResponse, - ListIngressForAllNamespacesResponse, - ListNamespacedIngressResponse, - PatchNamespacedIngressResponse, - PatchNamespacedIngressStatusResponse, - ReadNamespacedIngressOptional, ReadNamespacedIngressResponse, - ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse, - ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse, - ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse, - WatchIngressForAllNamespacesResponse, - WatchNamespacedIngressResponse, -}; +pub use self::ingress::Ingress; +#[cfg(feature = "api")] pub use self::ingress::{CreateNamespacedIngressOptional, CreateNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::DeleteCollectionNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::DeleteNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::ListIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::ListNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressStatusResponse; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressOptional, ReadNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::WatchIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::WatchNamespacedIngressResponse; mod ingress_backend; -pub use self::ingress_backend::{ - IngressBackend, -}; +pub use self::ingress_backend::IngressBackend; mod ingress_list; -pub use self::ingress_list::{ - IngressList, -}; +pub use self::ingress_list::IngressList; mod ingress_rule; -pub use self::ingress_rule::{ - IngressRule, -}; +pub use self::ingress_rule::IngressRule; mod ingress_spec; -pub use self::ingress_spec::{ - IngressSpec, -}; +pub use self::ingress_spec::IngressSpec; mod ingress_status; -pub use self::ingress_status::{ - IngressStatus, -}; +pub use self::ingress_status::IngressStatus; mod ingress_tls; -pub use self::ingress_tls::{ - IngressTLS, -}; +pub use self::ingress_tls::IngressTLS; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedReplicationControllerDummyScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerDummyScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_12/api/extensions/v1beta1/network_policy.rs b/src/v1_12/api/extensions/v1beta1/network_policy.rs index ae7e6d22c7..518f41f7cf 100644 --- a/src/v1_12/api/extensions/v1beta1/network_policy.rs +++ b/src/v1_12/api/extensions/v1beta1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_12::api::extensions::v1beta1::NetworkPolicy, @@ -66,6 +67,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_12::api::extensions::v1beta1::NetworkPolicy), @@ -85,6 +88,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -360,12 +371,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_12::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_12::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_12::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -615,12 +636,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_12::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -706,6 +730,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -715,6 +740,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_12::api::extensions::v1beta1::NetworkPolicy), @@ -722,6 +748,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -777,6 +804,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -798,12 +826,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -867,12 +898,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/extensions/v1beta1/pod_security_policy.rs b/src/v1_12/api/extensions/v1beta1/pod_security_policy.rs index 4760cf8ca8..5375512872 100644 --- a/src/v1_12/api/extensions/v1beta1/pod_security_policy.rs +++ b/src/v1_12/api/extensions/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_12::api::extensions::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -59,6 +60,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_12::api::extensions::v1beta1::PodSecurityPolicy), @@ -78,6 +81,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -159,6 +164,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_12::api::extensions::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_12::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -498,6 +515,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -509,12 +527,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_12::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_12::api::extensions::v1beta1::PodSecurityPolicy, @@ -594,6 +615,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -603,6 +625,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_12::api::extensions::v1beta1::PodSecurityPolicy), @@ -610,6 +633,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -679,12 +704,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/extensions/v1beta1/replica_set.rs b/src/v1_12/api/extensions/v1beta1/replica_set.rs index 5ae9c19a35..19ddf15023 100644 --- a/src/v1_12/api/extensions/v1beta1/replica_set.rs +++ b/src/v1_12/api/extensions/v1beta1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_12::api::extensions::v1beta1::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_12::api::extensions::v1beta1::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_12::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_12::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_12::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_12::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_12::api::extensions::v1beta1::ReplicaSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_12::api::extensions::v1beta1::ReplicaSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/extensions/v1beta1/scale.rs b/src/v1_12/api/extensions/v1beta1/scale.rs index 32d2e00b8e..e54826fabd 100644 --- a/src/v1_12/api/extensions/v1beta1/scale.rs +++ b/src/v1_12/api/extensions/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_12::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_12::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_12::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_12::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -599,6 +621,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -608,6 +631,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_12::api::extensions::v1beta1::Scale), @@ -615,6 +639,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -674,6 +699,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -708,6 +734,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -717,6 +744,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_12::api::extensions::v1beta1::Scale), @@ -724,6 +752,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +812,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -817,6 +847,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -826,6 +857,7 @@ pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_12::api::extensions::v1beta1::Scale), @@ -833,6 +865,7 @@ pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/networking/v1/mod.rs b/src/v1_12/api/networking/v1/mod.rs index fcd95f99a8..23233ec53d 100644 --- a/src/v1_12/api/networking/v1/mod.rs +++ b/src/v1_12/api/networking/v1/mod.rs @@ -1,50 +1,34 @@ mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; diff --git a/src/v1_12/api/networking/v1/network_policy.rs b/src/v1_12/api/networking/v1/network_policy.rs index c7398308f6..7cbd71c2ca 100644 --- a/src/v1_12/api/networking/v1/network_policy.rs +++ b/src/v1_12/api/networking/v1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_12::api::networking::v1::NetworkPolicy, @@ -66,6 +67,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_12::api::networking::v1::NetworkPolicy), @@ -85,6 +88,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -360,12 +371,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_12::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_12::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_12::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -615,12 +636,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_12::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -706,6 +730,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -715,6 +740,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_12::api::networking::v1::NetworkPolicy), @@ -722,6 +748,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -777,6 +804,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -798,12 +826,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -867,12 +898,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/policy/v1beta1/eviction.rs b/src/v1_12/api/policy/v1beta1/eviction.rs index 1048a707bf..551b494b6d 100644 --- a/src/v1_12/api/policy/v1beta1/eviction.rs +++ b/src/v1_12/api/policy/v1beta1/eviction.rs @@ -34,6 +34,7 @@ impl Eviction { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_eviction( name: &str, namespace: &str, @@ -72,6 +73,7 @@ impl Eviction { } /// Optional parameters of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodEvictionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedPodEvictionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodEvictionResponse { Ok(crate::v1_12::api::policy::v1beta1::Eviction), @@ -91,6 +94,7 @@ pub enum CreateNamespacedPodEvictionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodEvictionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/policy/v1beta1/mod.rs b/src/v1_12/api/policy/v1beta1/mod.rs index 4d8a99d607..336d3ebb5d 100644 --- a/src/v1_12/api/policy/v1beta1/mod.rs +++ b/src/v1_12/api/policy/v1beta1/mod.rs @@ -1,102 +1,70 @@ mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod eviction; -pub use self::eviction::{ - Eviction, - CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse, -}; +pub use self::eviction::Eviction; +#[cfg(feature = "api")] pub use self::eviction::{CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse}; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod pod_disruption_budget; -pub use self::pod_disruption_budget::{ - PodDisruptionBudget, - CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse, - DeleteCollectionNamespacedPodDisruptionBudgetResponse, - DeleteNamespacedPodDisruptionBudgetResponse, - ListNamespacedPodDisruptionBudgetResponse, - ListPodDisruptionBudgetForAllNamespacesResponse, - PatchNamespacedPodDisruptionBudgetResponse, - PatchNamespacedPodDisruptionBudgetStatusResponse, - ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse, - ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse, - ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse, - ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse, - WatchNamespacedPodDisruptionBudgetResponse, - WatchPodDisruptionBudgetForAllNamespacesResponse, -}; +pub use self::pod_disruption_budget::PodDisruptionBudget; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteCollectionNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListPodDisruptionBudgetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetStatusResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchPodDisruptionBudgetForAllNamespacesResponse; mod pod_disruption_budget_list; -pub use self::pod_disruption_budget_list::{ - PodDisruptionBudgetList, -}; +pub use self::pod_disruption_budget_list::PodDisruptionBudgetList; mod pod_disruption_budget_spec; -pub use self::pod_disruption_budget_spec::{ - PodDisruptionBudgetSpec, -}; +pub use self::pod_disruption_budget_spec::PodDisruptionBudgetSpec; mod pod_disruption_budget_status; -pub use self::pod_disruption_budget_status::{ - PodDisruptionBudgetStatus, -}; +pub use self::pod_disruption_budget_status::PodDisruptionBudgetStatus; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_12/api/policy/v1beta1/pod_disruption_budget.rs b/src/v1_12/api/policy/v1beta1/pod_disruption_budget.rs index b11a3d0699..56fc598282 100644 --- a/src/v1_12/api/policy/v1beta1/pod_disruption_budget.rs +++ b/src/v1_12/api/policy/v1beta1/pod_disruption_budget.rs @@ -32,6 +32,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_disruption_budget( namespace: &str, body: &crate::v1_12::api::policy::v1beta1::PodDisruptionBudget, @@ -68,6 +69,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_12::api::policy::v1beta1::PodDisruptionBudget), @@ -87,6 +90,7 @@ pub enum CreateNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -152,6 +156,7 @@ impl PodDisruptionBudget { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_disruption_budget( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -175,6 +180,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_collection_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -182,6 +188,7 @@ pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -265,6 +273,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -273,6 +282,7 @@ pub enum DeleteNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -341,6 +351,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -362,12 +373,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_12::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -411,6 +424,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_disruption_budget_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -429,12 +443,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_12::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -486,6 +502,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -515,12 +532,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_12::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -572,6 +591,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -601,12 +621,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_12::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -656,6 +678,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -692,6 +715,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -703,12 +727,14 @@ pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_12::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -758,6 +784,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -786,6 +813,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -793,12 +821,14 @@ pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_12::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -850,6 +880,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -884,6 +915,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -893,6 +925,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_12::api::policy::v1beta1::PodDisruptionBudget), @@ -900,6 +933,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -959,6 +993,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -993,6 +1028,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1002,6 +1038,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_12::api::policy::v1beta1::PodDisruptionBudget), @@ -1009,6 +1046,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1064,6 +1102,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -1085,12 +1124,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1136,6 +1177,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_disruption_budget_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1154,12 +1196,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/policy/v1beta1/pod_security_policy.rs b/src/v1_12/api/policy/v1beta1/pod_security_policy.rs index 6031ef3e3d..490fcdbfae 100644 --- a/src/v1_12/api/policy/v1beta1/pod_security_policy.rs +++ b/src/v1_12/api/policy/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_12::api::policy::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -59,6 +60,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_12::api::policy::v1beta1::PodSecurityPolicy), @@ -78,6 +81,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -159,6 +164,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_12::api::policy::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_12::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -498,6 +515,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -509,12 +527,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_12::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_12::api::policy::v1beta1::PodSecurityPolicy, @@ -594,6 +615,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -603,6 +625,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_12::api::policy::v1beta1::PodSecurityPolicy), @@ -610,6 +633,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -679,12 +704,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1/cluster_role.rs b/src/v1_12/api/rbac/v1/cluster_role.rs index 4f2e534001..371cfb5255 100644 --- a/src/v1_12/api/rbac/v1/cluster_role.rs +++ b/src/v1_12/api/rbac/v1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_12::api::rbac::v1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_12::api::rbac::v1::ClusterRole, @@ -585,6 +606,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1::ClusterRole), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1/cluster_role_binding.rs b/src/v1_12/api/rbac/v1/cluster_role_binding.rs index 6450389283..256c21cd17 100644 --- a/src/v1_12/api/rbac/v1/cluster_role_binding.rs +++ b/src/v1_12/api/rbac/v1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_12::api::rbac::v1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_12::api::rbac::v1::ClusterRoleBinding, @@ -585,6 +606,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1::ClusterRoleBinding), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1/mod.rs b/src/v1_12/api/rbac/v1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_12/api/rbac/v1/mod.rs +++ b/src/v1_12/api/rbac/v1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_12/api/rbac/v1/role.rs b/src/v1_12/api/rbac/v1/role.rs index ea4b7a6c74..36b340ba7a 100644 --- a/src/v1_12/api/rbac/v1/role.rs +++ b/src/v1_12/api/rbac/v1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_12::api::rbac::v1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_12::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -694,6 +718,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -703,6 +728,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1::Role), @@ -710,6 +736,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -765,6 +792,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -786,12 +814,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +867,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -855,12 +886,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1/role_binding.rs b/src/v1_12/api/rbac/v1/role_binding.rs index cd6acd66f7..da8f220874 100644 --- a/src/v1_12/api/rbac/v1/role_binding.rs +++ b/src/v1_12/api/rbac/v1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_12::api::rbac::v1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_12::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -697,6 +721,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -706,6 +731,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1::RoleBinding), @@ -713,6 +739,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -768,6 +795,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -789,12 +817,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +870,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -858,12 +889,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1alpha1/cluster_role.rs b/src/v1_12/api/rbac/v1alpha1/cluster_role.rs index a3b5d105b3..df2a8e97f2 100644 --- a/src/v1_12/api/rbac/v1alpha1/cluster_role.rs +++ b/src/v1_12/api/rbac/v1alpha1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_12::api::rbac::v1alpha1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1alpha1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1alpha1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_12::api::rbac::v1alpha1::ClusterRole, @@ -585,6 +606,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1alpha1::ClusterRole), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1alpha1/cluster_role_binding.rs b/src/v1_12/api/rbac/v1alpha1/cluster_role_binding.rs index 2116ce6c34..31321ac651 100644 --- a/src/v1_12/api/rbac/v1alpha1/cluster_role_binding.rs +++ b/src/v1_12/api/rbac/v1alpha1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_12::api::rbac::v1alpha1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1alpha1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1alpha1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_12::api::rbac::v1alpha1::ClusterRoleBinding, @@ -585,6 +606,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1alpha1::ClusterRoleBinding), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1alpha1/mod.rs b/src/v1_12/api/rbac/v1alpha1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_12/api/rbac/v1alpha1/mod.rs +++ b/src/v1_12/api/rbac/v1alpha1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_12/api/rbac/v1alpha1/role.rs b/src/v1_12/api/rbac/v1alpha1/role.rs index d53e9bb3ed..6912adc670 100644 --- a/src/v1_12/api/rbac/v1alpha1/role.rs +++ b/src/v1_12/api/rbac/v1alpha1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_12::api::rbac::v1alpha1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1alpha1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_12::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -694,6 +718,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -703,6 +728,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1alpha1::Role), @@ -710,6 +736,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -765,6 +792,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -786,12 +814,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +867,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -855,12 +886,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1alpha1/role_binding.rs b/src/v1_12/api/rbac/v1alpha1/role_binding.rs index cecfde2b8e..6057705465 100644 --- a/src/v1_12/api/rbac/v1alpha1/role_binding.rs +++ b/src/v1_12/api/rbac/v1alpha1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_12::api::rbac::v1alpha1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1alpha1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_12::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -697,6 +721,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -706,6 +731,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1alpha1::RoleBinding), @@ -713,6 +739,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -768,6 +795,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -789,12 +817,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +870,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -858,12 +889,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1beta1/cluster_role.rs b/src/v1_12/api/rbac/v1beta1/cluster_role.rs index 1097a6f584..ce1aad4eec 100644 --- a/src/v1_12/api/rbac/v1beta1/cluster_role.rs +++ b/src/v1_12/api/rbac/v1beta1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_12::api::rbac::v1beta1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1beta1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1beta1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_12::api::rbac::v1beta1::ClusterRole, @@ -585,6 +606,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_12::api::rbac::v1beta1::ClusterRole), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1beta1/cluster_role_binding.rs b/src/v1_12/api/rbac/v1beta1/cluster_role_binding.rs index 7ccb354f18..3fc5a15903 100644 --- a/src/v1_12/api/rbac/v1beta1/cluster_role_binding.rs +++ b/src/v1_12/api/rbac/v1beta1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_12::api::rbac::v1beta1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1beta1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1beta1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_12::api::rbac::v1beta1::ClusterRoleBinding, @@ -585,6 +606,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1beta1::ClusterRoleBinding), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1beta1/mod.rs b/src/v1_12/api/rbac/v1beta1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_12/api/rbac/v1beta1/mod.rs +++ b/src/v1_12/api/rbac/v1beta1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_12/api/rbac/v1beta1/role.rs b/src/v1_12/api/rbac/v1beta1/role.rs index f93457c1d2..687a8ffa8a 100644 --- a/src/v1_12/api/rbac/v1beta1/role.rs +++ b/src/v1_12/api/rbac/v1beta1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_12::api::rbac::v1beta1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1beta1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_12::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -694,6 +718,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -703,6 +728,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_12::api::rbac::v1beta1::Role), @@ -710,6 +736,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -765,6 +792,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -786,12 +814,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +867,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -855,12 +886,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/rbac/v1beta1/role_binding.rs b/src/v1_12/api/rbac/v1beta1/role_binding.rs index 0ecd5d683a..3bca2d440f 100644 --- a/src/v1_12/api/rbac/v1beta1/role_binding.rs +++ b/src/v1_12/api/rbac/v1beta1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_12::api::rbac::v1beta1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1beta1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_12::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -697,6 +721,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -706,6 +731,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_12::api::rbac::v1beta1::RoleBinding), @@ -713,6 +739,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -768,6 +795,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -789,12 +817,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +870,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -858,12 +889,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/scheduling/v1alpha1/mod.rs b/src/v1_12/api/scheduling/v1alpha1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_12/api/scheduling/v1alpha1/mod.rs +++ b/src/v1_12/api/scheduling/v1alpha1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_12/api/scheduling/v1alpha1/priority_class.rs b/src/v1_12/api/scheduling/v1alpha1/priority_class.rs index 3c26d7742d..43ac844bc5 100644 --- a/src/v1_12/api/scheduling/v1alpha1/priority_class.rs +++ b/src/v1_12/api/scheduling/v1alpha1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_12::api::scheduling::v1alpha1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -65,6 +66,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -76,6 +78,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_12::api::scheduling::v1alpha1::PriorityClass), @@ -84,6 +87,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -145,6 +149,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -165,6 +170,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -172,6 +178,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -249,6 +257,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -257,6 +266,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -339,12 +350,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_12::api::scheduling::v1alpha1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -392,6 +405,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -419,12 +433,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_12::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -470,6 +486,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -504,6 +521,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -515,12 +533,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_12::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +588,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_12::api::scheduling::v1alpha1::PriorityClass, @@ -600,6 +621,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_12::api::scheduling::v1alpha1::PriorityClass), @@ -616,6 +639,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/scheduling/v1beta1/mod.rs b/src/v1_12/api/scheduling/v1beta1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_12/api/scheduling/v1beta1/mod.rs +++ b/src/v1_12/api/scheduling/v1beta1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_12/api/scheduling/v1beta1/priority_class.rs b/src/v1_12/api/scheduling/v1beta1/priority_class.rs index 10e778b5f8..323c4b8427 100644 --- a/src/v1_12/api/scheduling/v1beta1/priority_class.rs +++ b/src/v1_12/api/scheduling/v1beta1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_12::api::scheduling::v1beta1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -65,6 +66,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -76,6 +78,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_12::api::scheduling::v1beta1::PriorityClass), @@ -84,6 +87,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -145,6 +149,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -165,6 +170,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -172,6 +178,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -249,6 +257,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -257,6 +266,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -339,12 +350,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_12::api::scheduling::v1beta1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -392,6 +405,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -419,12 +433,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_12::api::scheduling::v1beta1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -470,6 +486,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -504,6 +521,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -515,12 +533,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_12::api::scheduling::v1beta1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +588,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_12::api::scheduling::v1beta1::PriorityClass, @@ -600,6 +621,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_12::api::scheduling::v1beta1::PriorityClass), @@ -616,6 +639,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/settings/v1alpha1/mod.rs b/src/v1_12/api/settings/v1alpha1/mod.rs index f0ebd9df12..7816e600a8 100644 --- a/src/v1_12/api/settings/v1alpha1/mod.rs +++ b/src/v1_12/api/settings/v1alpha1/mod.rs @@ -1,25 +1,19 @@ mod pod_preset; -pub use self::pod_preset::{ - PodPreset, - CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse, - DeleteCollectionNamespacedPodPresetResponse, - DeleteNamespacedPodPresetResponse, - ListNamespacedPodPresetResponse, - ListPodPresetForAllNamespacesResponse, - PatchNamespacedPodPresetResponse, - ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse, - ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse, - WatchNamespacedPodPresetResponse, - WatchPodPresetForAllNamespacesResponse, -}; +pub use self::pod_preset::PodPreset; +#[cfg(feature = "api")] pub use self::pod_preset::{CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteCollectionNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListPodPresetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_preset::PatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::{ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::{ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::WatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::WatchPodPresetForAllNamespacesResponse; mod pod_preset_list; -pub use self::pod_preset_list::{ - PodPresetList, -}; +pub use self::pod_preset_list::PodPresetList; mod pod_preset_spec; -pub use self::pod_preset_spec::{ - PodPresetSpec, -}; +pub use self::pod_preset_spec::PodPresetSpec; diff --git a/src/v1_12/api/settings/v1alpha1/pod_preset.rs b/src/v1_12/api/settings/v1alpha1/pod_preset.rs index bed4f7c2c4..a091a11ff2 100644 --- a/src/v1_12/api/settings/v1alpha1/pod_preset.rs +++ b/src/v1_12/api/settings/v1alpha1/pod_preset.rs @@ -28,6 +28,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_preset( namespace: &str, body: &crate::v1_12::api::settings::v1alpha1::PodPreset, @@ -64,6 +65,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodPresetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodPresetResponse { Ok(crate::v1_12::api::settings::v1alpha1::PodPreset), @@ -83,6 +86,7 @@ pub enum CreateNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -148,6 +152,7 @@ impl PodPreset { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_preset( namespace: &str, delete_optional: crate::v1_12::DeleteOptional<'_>, @@ -171,6 +176,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_collection_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodPresetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -178,6 +184,7 @@ pub enum DeleteCollectionNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -240,6 +247,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_preset( name: &str, namespace: &str, @@ -261,6 +269,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodPresetResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -269,6 +278,7 @@ pub enum DeleteNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -337,6 +347,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_preset( namespace: &str, optional: crate::v1_12::ListOptional<'_>, @@ -358,12 +369,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodPresetResponse { Ok(crate::v1_12::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -407,6 +420,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_preset_for_all_namespaces( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -425,12 +439,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodPresetForAllNamespacesResponse { Ok(crate::v1_12::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -482,6 +498,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_preset( name: &str, namespace: &str, @@ -511,12 +528,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::patch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodPresetResponse { Ok(crate::v1_12::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -566,6 +585,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_preset( name: &str, namespace: &str, @@ -602,6 +622,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodPresetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -613,12 +634,14 @@ pub struct ReadNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodPresetResponse { Ok(crate::v1_12::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -670,6 +693,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_preset( name: &str, namespace: &str, @@ -704,6 +728,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodPresetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -713,6 +738,7 @@ pub struct ReplaceNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodPresetResponse { Ok(crate::v1_12::api::settings::v1alpha1::PodPreset), @@ -720,6 +746,7 @@ pub enum ReplaceNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -775,6 +802,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_preset( namespace: &str, optional: crate::v1_12::WatchOptional<'_>, @@ -796,12 +824,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodPresetResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -847,6 +877,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_preset_for_all_namespaces( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -865,12 +896,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodPresetForAllNamespacesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/storage/v1/mod.rs b/src/v1_12/api/storage/v1/mod.rs index d20d9cc056..0d65688c2d 100644 --- a/src/v1_12/api/storage/v1/mod.rs +++ b/src/v1_12/api/storage/v1/mod.rs @@ -1,18 +1,14 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; diff --git a/src/v1_12/api/storage/v1/storage_class.rs b/src/v1_12/api/storage/v1/storage_class.rs index cdac32d602..9ca41fee3e 100644 --- a/src/v1_12/api/storage/v1/storage_class.rs +++ b/src/v1_12/api/storage/v1/storage_class.rs @@ -46,6 +46,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_12::api::storage::v1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -79,6 +80,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -90,6 +92,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_12::api::storage::v1::StorageClass), @@ -98,6 +101,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -159,6 +163,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -179,6 +184,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -263,6 +271,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_12::api::storage::v1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -433,12 +447,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_12::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -518,6 +535,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -529,12 +547,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_12::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -582,6 +602,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_12::api::storage::v1::StorageClass, @@ -614,6 +635,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -623,6 +645,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_12::api::storage::v1::StorageClass), @@ -630,6 +653,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -681,6 +705,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -699,12 +724,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/storage/v1alpha1/mod.rs b/src/v1_12/api/storage/v1alpha1/mod.rs index a5eefeed6c..4b5a7d41ec 100644 --- a/src/v1_12/api/storage/v1alpha1/mod.rs +++ b/src/v1_12/api/storage/v1alpha1/mod.rs @@ -1,38 +1,26 @@ mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_12/api/storage/v1alpha1/volume_attachment.rs b/src/v1_12/api/storage/v1alpha1/volume_attachment.rs index 74395c3cbb..e85cb3a531 100644 --- a/src/v1_12/api/storage/v1alpha1/volume_attachment.rs +++ b/src/v1_12/api/storage/v1alpha1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_12::api::storage::v1alpha1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -64,6 +65,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_12::api::storage::v1alpha1::VolumeAttachment), @@ -83,6 +86,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -164,6 +169,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -338,12 +349,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_12::api::storage::v1alpha1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -418,12 +432,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_12::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -503,6 +520,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -514,12 +532,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_12::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -567,6 +587,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_12::api::storage::v1alpha1::VolumeAttachment, @@ -599,6 +620,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -608,6 +630,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_12::api::storage::v1alpha1::VolumeAttachment), @@ -615,6 +638,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -666,6 +690,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -684,12 +709,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/storage/v1beta1/mod.rs b/src/v1_12/api/storage/v1beta1/mod.rs index 68d636f0cb..bcaee085a0 100644 --- a/src/v1_12/api/storage/v1beta1/mod.rs +++ b/src/v1_12/api/storage/v1beta1/mod.rs @@ -1,56 +1,40 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_12/api/storage/v1beta1/storage_class.rs b/src/v1_12/api/storage/v1beta1/storage_class.rs index 75510cd249..aeba775070 100644 --- a/src/v1_12/api/storage/v1beta1/storage_class.rs +++ b/src/v1_12/api/storage/v1beta1/storage_class.rs @@ -46,6 +46,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_12::api::storage::v1beta1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -79,6 +80,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -90,6 +92,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_12::api::storage::v1beta1::StorageClass), @@ -98,6 +101,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -159,6 +163,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -179,6 +184,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -263,6 +271,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_12::api::storage::v1beta1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -433,12 +447,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_12::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -518,6 +535,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -529,12 +547,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_12::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -582,6 +602,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_12::api::storage::v1beta1::StorageClass, @@ -614,6 +635,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -623,6 +645,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_12::api::storage::v1beta1::StorageClass), @@ -630,6 +653,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -681,6 +705,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -699,12 +724,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/api/storage/v1beta1/volume_attachment.rs b/src/v1_12/api/storage/v1beta1/volume_attachment.rs index be9b7d38d5..7ff8f91949 100644 --- a/src/v1_12/api/storage/v1beta1/volume_attachment.rs +++ b/src/v1_12/api/storage/v1beta1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_12::api::storage::v1beta1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -64,6 +65,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_12::api::storage::v1beta1::VolumeAttachment), @@ -83,6 +86,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -164,6 +169,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -338,12 +349,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_12::api::storage::v1beta1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -418,12 +432,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_12::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -503,6 +520,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -514,12 +532,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_12::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -567,6 +587,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_12::api::storage::v1beta1::VolumeAttachment, @@ -599,6 +620,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -608,6 +630,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_12::api::storage::v1beta1::VolumeAttachment), @@ -615,6 +638,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -666,6 +690,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -684,12 +709,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs b/src/v1_12/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs index 1c7a9c62a2..022fa6799f 100644 --- a/src/v1_12/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs +++ b/src/v1_12/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs @@ -28,6 +28,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_custom_resource_definition( body: &crate::v1_12::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, optional: CreateCustomResourceDefinitionOptional<'_>, @@ -61,6 +62,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCustomResourceDefinitionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCustomResourceDefinitionResponse { Ok(crate::v1_12::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -80,6 +83,7 @@ pub enum CreateCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CustomResourceDefinition { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_custom_resource_definition( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -161,6 +166,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_collection_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCustomResourceDefinitionResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -226,6 +233,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_custom_resource_definition( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -245,6 +253,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCustomResourceDefinitionResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -253,6 +262,7 @@ pub enum DeleteCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_custom_resource_definition( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::list_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCustomResourceDefinitionResponse { Ok(crate::v1_12::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinitionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionResponse { Ok(crate::v1_12::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition_status( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionStatusResponse { Ok(crate::v1_12::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition( name: &str, optional: ReadCustomResourceDefinitionOptional<'_>, @@ -580,6 +600,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -591,12 +612,14 @@ pub struct ReadCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionResponse { Ok(crate::v1_12::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition_status( name: &str, optional: ReadCustomResourceDefinitionStatusOptional<'_>, @@ -668,6 +692,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionStatusResponse { Ok(crate::v1_12::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition( name: &str, body: &crate::v1_12::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -760,6 +788,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -769,6 +798,7 @@ pub struct ReplaceCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionResponse { Ok(crate::v1_12::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -776,6 +806,7 @@ pub enum ReplaceCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -831,6 +862,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition_status( name: &str, body: &crate::v1_12::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -863,6 +895,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -872,6 +905,7 @@ pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionStatusResponse { Ok(crate::v1_12::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -879,6 +913,7 @@ pub enum ReplaceCustomResourceDefinitionStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -930,6 +965,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_custom_resource_definition( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -948,12 +984,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::watch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCustomResourceDefinitionResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs b/src/v1_12/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs index 6356eefc43..3cdf40231b 100644 --- a/src/v1_12/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs +++ b/src/v1_12/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs @@ -1,101 +1,65 @@ mod custom_resource_column_definition; -pub use self::custom_resource_column_definition::{ - CustomResourceColumnDefinition, -}; +pub use self::custom_resource_column_definition::CustomResourceColumnDefinition; mod custom_resource_definition; -pub use self::custom_resource_definition::{ - CustomResourceDefinition, - CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse, - DeleteCollectionCustomResourceDefinitionResponse, - DeleteCustomResourceDefinitionResponse, - ListCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionStatusResponse, - ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse, - ReadCustomResourceDefinitionStatusOptional, ReadCustomResourceDefinitionStatusResponse, - ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse, - ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse, - WatchCustomResourceDefinitionResponse, -}; +pub use self::custom_resource_definition::CustomResourceDefinition; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCollectionCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::ListCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionStatusResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionStatusOptional, ReadCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::WatchCustomResourceDefinitionResponse; mod custom_resource_definition_condition; -pub use self::custom_resource_definition_condition::{ - CustomResourceDefinitionCondition, -}; +pub use self::custom_resource_definition_condition::CustomResourceDefinitionCondition; mod custom_resource_definition_list; -pub use self::custom_resource_definition_list::{ - CustomResourceDefinitionList, -}; +pub use self::custom_resource_definition_list::CustomResourceDefinitionList; mod custom_resource_definition_names; -pub use self::custom_resource_definition_names::{ - CustomResourceDefinitionNames, -}; +pub use self::custom_resource_definition_names::CustomResourceDefinitionNames; mod custom_resource_definition_spec; -pub use self::custom_resource_definition_spec::{ - CustomResourceDefinitionSpec, -}; +pub use self::custom_resource_definition_spec::CustomResourceDefinitionSpec; mod custom_resource_definition_status; -pub use self::custom_resource_definition_status::{ - CustomResourceDefinitionStatus, -}; +pub use self::custom_resource_definition_status::CustomResourceDefinitionStatus; mod custom_resource_definition_version; -pub use self::custom_resource_definition_version::{ - CustomResourceDefinitionVersion, -}; +pub use self::custom_resource_definition_version::CustomResourceDefinitionVersion; mod custom_resource_subresource_scale; -pub use self::custom_resource_subresource_scale::{ - CustomResourceSubresourceScale, -}; +pub use self::custom_resource_subresource_scale::CustomResourceSubresourceScale; mod custom_resource_subresource_status; -pub use self::custom_resource_subresource_status::{ - CustomResourceSubresourceStatus, -}; +pub use self::custom_resource_subresource_status::CustomResourceSubresourceStatus; mod custom_resource_subresources; -pub use self::custom_resource_subresources::{ - CustomResourceSubresources, -}; +pub use self::custom_resource_subresources::CustomResourceSubresources; mod custom_resource_validation; -pub use self::custom_resource_validation::{ - CustomResourceValidation, -}; +pub use self::custom_resource_validation::CustomResourceValidation; mod external_documentation; -pub use self::external_documentation::{ - ExternalDocumentation, -}; +pub use self::external_documentation::ExternalDocumentation; mod json; -pub use self::json::{ - JSON, -}; +pub use self::json::JSON; mod json_schema_props; -pub use self::json_schema_props::{ - JSONSchemaProps, -}; +pub use self::json_schema_props::JSONSchemaProps; mod json_schema_props_or_array; -pub use self::json_schema_props_or_array::{ - JSONSchemaPropsOrArray, -}; +pub use self::json_schema_props_or_array::JSONSchemaPropsOrArray; mod json_schema_props_or_bool; -pub use self::json_schema_props_or_bool::{ - JSONSchemaPropsOrBool, -}; +pub use self::json_schema_props_or_bool::JSONSchemaPropsOrBool; mod json_schema_props_or_string_array; -pub use self::json_schema_props_or_string_array::{ - JSONSchemaPropsOrStringArray, -}; +pub use self::json_schema_props_or_string_array::JSONSchemaPropsOrStringArray; diff --git a/src/v1_12/apimachinery/pkg/api/resource/mod.rs b/src/v1_12/apimachinery/pkg/api/resource/mod.rs index 352925b923..629eeca5bc 100644 --- a/src/v1_12/apimachinery/pkg/api/resource/mod.rs +++ b/src/v1_12/apimachinery/pkg/api/resource/mod.rs @@ -1,5 +1,3 @@ mod quantity; -pub use self::quantity::{ - Quantity, -}; +pub use self::quantity::Quantity; diff --git a/src/v1_12/apimachinery/pkg/apis/meta/v1/mod.rs b/src/v1_12/apimachinery/pkg/apis/meta/v1/mod.rs index 9654f201d6..2a0195df45 100644 --- a/src/v1_12/apimachinery/pkg/apis/meta/v1/mod.rs +++ b/src/v1_12/apimachinery/pkg/apis/meta/v1/mod.rs @@ -1,115 +1,69 @@ mod api_group; -pub use self::api_group::{ - APIGroup, -}; +pub use self::api_group::APIGroup; mod api_group_list; -pub use self::api_group_list::{ - APIGroupList, -}; +pub use self::api_group_list::APIGroupList; mod api_resource; -pub use self::api_resource::{ - APIResource, -}; +pub use self::api_resource::APIResource; mod api_resource_list; -pub use self::api_resource_list::{ - APIResourceList, -}; +pub use self::api_resource_list::APIResourceList; mod api_versions; -pub use self::api_versions::{ - APIVersions, -}; +pub use self::api_versions::APIVersions; mod delete_options; -pub use self::delete_options::{ - DeleteOptions, -}; +pub use self::delete_options::DeleteOptions; mod group_version_for_discovery; -pub use self::group_version_for_discovery::{ - GroupVersionForDiscovery, -}; +pub use self::group_version_for_discovery::GroupVersionForDiscovery; mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializers; -pub use self::initializers::{ - Initializers, -}; +pub use self::initializers::Initializers; mod label_selector; -pub use self::label_selector::{ - LabelSelector, -}; +pub use self::label_selector::LabelSelector; mod label_selector_requirement; -pub use self::label_selector_requirement::{ - LabelSelectorRequirement, -}; +pub use self::label_selector_requirement::LabelSelectorRequirement; mod list_meta; -pub use self::list_meta::{ - ListMeta, -}; +pub use self::list_meta::ListMeta; mod micro_time; -pub use self::micro_time::{ - MicroTime, -}; +pub use self::micro_time::MicroTime; mod object_meta; -pub use self::object_meta::{ - ObjectMeta, -}; +pub use self::object_meta::ObjectMeta; mod owner_reference; -pub use self::owner_reference::{ - OwnerReference, -}; +pub use self::owner_reference::OwnerReference; mod patch; -pub use self::patch::{ - Patch, -}; +pub use self::patch::Patch; mod preconditions; -pub use self::preconditions::{ - Preconditions, -}; +pub use self::preconditions::Preconditions; mod server_address_by_client_cidr; -pub use self::server_address_by_client_cidr::{ - ServerAddressByClientCIDR, -}; +pub use self::server_address_by_client_cidr::ServerAddressByClientCIDR; mod status; -pub use self::status::{ - Status, -}; +pub use self::status::Status; mod status_cause; -pub use self::status_cause::{ - StatusCause, -}; +pub use self::status_cause::StatusCause; mod status_details; -pub use self::status_details::{ - StatusDetails, -}; +pub use self::status_details::StatusDetails; mod time; -pub use self::time::{ - Time, -}; +pub use self::time::Time; mod watch_event; -pub use self::watch_event::{ - WatchEvent, -}; +pub use self::watch_event::WatchEvent; diff --git a/src/v1_12/apimachinery/pkg/runtime/mod.rs b/src/v1_12/apimachinery/pkg/runtime/mod.rs index 8614e1a158..eb2b8c0503 100644 --- a/src/v1_12/apimachinery/pkg/runtime/mod.rs +++ b/src/v1_12/apimachinery/pkg/runtime/mod.rs @@ -1,5 +1,3 @@ mod raw_extension; -pub use self::raw_extension::{ - RawExtension, -}; +pub use self::raw_extension::RawExtension; diff --git a/src/v1_12/apimachinery/pkg/util/intstr/mod.rs b/src/v1_12/apimachinery/pkg/util/intstr/mod.rs index 0d14f602e5..d3f7196121 100644 --- a/src/v1_12/apimachinery/pkg/util/intstr/mod.rs +++ b/src/v1_12/apimachinery/pkg/util/intstr/mod.rs @@ -1,5 +1,3 @@ mod int_or_string; -pub use self::int_or_string::{ - IntOrString, -}; +pub use self::int_or_string::IntOrString; diff --git a/src/v1_12/apimachinery/pkg/version/mod.rs b/src/v1_12/apimachinery/pkg/version/mod.rs index 540fa68d40..f125e577d1 100644 --- a/src/v1_12/apimachinery/pkg/version/mod.rs +++ b/src/v1_12/apimachinery/pkg/version/mod.rs @@ -1,5 +1,3 @@ mod info; -pub use self::info::{ - Info, -}; +pub use self::info::Info; diff --git a/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs b/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs index c81f22f76c..e34a305b0b 100644 --- a/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs +++ b/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -61,6 +62,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -80,6 +83,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -254,6 +262,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service_status( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceStatusResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -580,6 +600,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -591,12 +612,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service_status( name: &str, optional: ReadAPIServiceStatusOptional<'_>, @@ -668,6 +692,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceStatusResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -760,6 +788,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -769,6 +798,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -776,6 +806,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -831,6 +862,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -863,6 +895,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -872,6 +905,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -879,6 +913,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -930,6 +965,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -948,12 +984,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs b/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs index f3c577aa5e..d210366939 100644 --- a/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs +++ b/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs @@ -1,41 +1,29 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - PatchAPIServiceStatusResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceStatusResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs b/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs index bb60440c73..17528d447e 100644 --- a/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs +++ b/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -61,6 +62,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -80,6 +83,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_12::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_12::DeleteOptional<'_>, list_optional: crate::v1_12::ListOptional<'_>, @@ -254,6 +262,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_12::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_12::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service_status( name: &str, body: &crate::v1_12::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceStatusResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -580,6 +600,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -591,12 +612,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service_status( name: &str, optional: ReadAPIServiceStatusOptional<'_>, @@ -668,6 +692,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceStatusResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -760,6 +788,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -769,6 +798,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -776,6 +806,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -831,6 +862,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -863,6 +895,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -872,6 +905,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_12::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -879,6 +913,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -930,6 +965,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_12::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -948,12 +984,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs b/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs index f3c577aa5e..d210366939 100644 --- a/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs +++ b/src/v1_12/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs @@ -1,41 +1,29 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - PatchAPIServiceStatusResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceStatusResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_12/mod.rs b/src/v1_12/mod.rs index 4d94724acd..812aef5986 100644 --- a/src/v1_12/mod.rs +++ b/src/v1_12/mod.rs @@ -1,23 +1,15 @@ mod delete_optional; -pub use self::delete_optional::{ - DeleteOptional, -}; +pub use self::delete_optional::DeleteOptional; mod list_optional; -pub use self::list_optional::{ - ListOptional, -}; +pub use self::list_optional::ListOptional; mod patch_optional; -pub use self::patch_optional::{ - PatchOptional, -}; +pub use self::patch_optional::PatchOptional; mod watch_optional; -pub use self::watch_optional::{ - WatchOptional, -}; +pub use self::watch_optional::WatchOptional; pub mod api; @@ -32,6 +24,7 @@ pub mod kube_aggregator; /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAPIVersionsResponse`]`>` constructor, or [`GetAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/".to_owned(); @@ -45,12 +38,14 @@ pub fn get_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAPIVersionsResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroupList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -85,6 +80,7 @@ impl crate::Response for GetAPIVersionsResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationAPIGroupResponse`]`>` constructor, or [`GetAdmissionregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/".to_owned(); @@ -98,12 +94,14 @@ pub fn get_admissionregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +136,7 @@ impl crate::Response for GetAdmissionregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1alpha1/".to_owned(); @@ -151,12 +150,14 @@ pub fn get_admissionregistration_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1alpha1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -191,6 +192,7 @@ impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1beta1/".to_owned(); @@ -204,12 +206,14 @@ pub fn get_admissionregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +248,7 @@ impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsAPIGroupResponse`]`>` constructor, or [`GetApiextensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/".to_owned(); @@ -257,12 +262,14 @@ pub fn get_apiextensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +304,7 @@ impl crate::Response for GetApiextensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiextensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/v1beta1/".to_owned(); @@ -310,12 +318,14 @@ pub fn get_apiextensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +360,7 @@ impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationAPIGroupResponse`]`>` constructor, or [`GetApiregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/".to_owned(); @@ -363,12 +374,14 @@ pub fn get_apiregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -403,6 +416,7 @@ impl crate::Response for GetApiregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1/".to_owned(); @@ -416,12 +430,14 @@ pub fn get_apiregistration_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -456,6 +472,7 @@ impl crate::Response for GetApiregistrationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1beta1/".to_owned(); @@ -469,12 +486,14 @@ pub fn get_apiregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -509,6 +528,7 @@ impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsAPIGroupResponse`]`>` constructor, or [`GetAppsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/".to_owned(); @@ -522,12 +542,14 @@ pub fn get_apps_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +584,7 @@ impl crate::Response for GetAppsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1APIResourcesResponse`]`>` constructor, or [`GetAppsV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1/".to_owned(); @@ -575,12 +598,14 @@ pub fn get_apps_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -615,6 +640,7 @@ impl crate::Response for GetAppsV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta1APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta1/".to_owned(); @@ -628,12 +654,14 @@ pub fn get_apps_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +696,7 @@ impl crate::Response for GetAppsV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta2APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta2/".to_owned(); @@ -681,12 +710,14 @@ pub fn get_apps_v1beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta2APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -721,6 +752,7 @@ impl crate::Response for GetAppsV1beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationAPIGroupResponse`]`>` constructor, or [`GetAuthenticationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/".to_owned(); @@ -734,12 +766,14 @@ pub fn get_authentication_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +808,7 @@ impl crate::Response for GetAuthenticationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1/".to_owned(); @@ -787,12 +822,14 @@ pub fn get_authentication_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -827,6 +864,7 @@ impl crate::Response for GetAuthenticationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1beta1/".to_owned(); @@ -840,12 +878,14 @@ pub fn get_authentication_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -880,6 +920,7 @@ impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationAPIGroupResponse`]`>` constructor, or [`GetAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/".to_owned(); @@ -893,12 +934,14 @@ pub fn get_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +976,7 @@ impl crate::Response for GetAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1/".to_owned(); @@ -946,12 +990,14 @@ pub fn get_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -986,6 +1032,7 @@ impl crate::Response for GetAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1beta1/".to_owned(); @@ -999,12 +1046,14 @@ pub fn get_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1039,6 +1088,7 @@ impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingAPIGroupResponse`]`>` constructor, or [`GetAutoscalingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/".to_owned(); @@ -1052,12 +1102,14 @@ pub fn get_autoscaling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1092,6 +1144,7 @@ impl crate::Response for GetAutoscalingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v1/".to_owned(); @@ -1105,12 +1158,14 @@ pub fn get_autoscaling_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1145,6 +1200,7 @@ impl crate::Response for GetAutoscalingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta1/".to_owned(); @@ -1158,12 +1214,14 @@ pub fn get_autoscaling_v2beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1198,6 +1256,7 @@ impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta2APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta2/".to_owned(); @@ -1211,12 +1270,14 @@ pub fn get_autoscaling_v2beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta2APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1251,6 +1312,7 @@ impl crate::Response for GetAutoscalingV2beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchAPIGroupResponse`]`>` constructor, or [`GetBatchAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/".to_owned(); @@ -1264,12 +1326,14 @@ pub fn get_batch_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1304,6 +1368,7 @@ impl crate::Response for GetBatchAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1APIResourcesResponse`]`>` constructor, or [`GetBatchV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1/".to_owned(); @@ -1317,12 +1382,14 @@ pub fn get_batch_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1357,6 +1424,7 @@ impl crate::Response for GetBatchV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1beta1APIResourcesResponse`]`>` constructor, or [`GetBatchV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1beta1/".to_owned(); @@ -1370,12 +1438,14 @@ pub fn get_batch_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1410,6 +1480,7 @@ impl crate::Response for GetBatchV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV2alpha1APIResourcesResponse`]`>` constructor, or [`GetBatchV2alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v2alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v2alpha1/".to_owned(); @@ -1423,12 +1494,14 @@ pub fn get_batch_v2alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v2alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV2alpha1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV2alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1463,6 +1536,7 @@ impl crate::Response for GetBatchV2alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesAPIGroupResponse`]`>` constructor, or [`GetCertificatesAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/".to_owned(); @@ -1476,12 +1550,14 @@ pub fn get_certificates_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1516,6 +1592,7 @@ impl crate::Response for GetCertificatesAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesV1beta1APIResourcesResponse`]`>` constructor, or [`GetCertificatesV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/v1beta1/".to_owned(); @@ -1529,12 +1606,14 @@ pub fn get_certificates_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1569,6 +1648,7 @@ impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { /// get the code version /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCodeVersionResponse`]`>` constructor, or [`GetCodeVersionResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_code_version( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/version/".to_owned(); @@ -1582,12 +1662,14 @@ pub fn get_code_version( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_code_version`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCodeVersionResponse { Ok(crate::v1_12::apimachinery::pkg::version::Info), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCodeVersionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1622,6 +1704,7 @@ impl crate::Response for GetCodeVersionResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoordinationAPIGroupResponse`]`>` constructor, or [`GetCoordinationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_coordination_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/coordination.k8s.io/".to_owned(); @@ -1635,12 +1718,14 @@ pub fn get_coordination_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_coordination_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoordinationAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoordinationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1675,6 +1760,7 @@ impl crate::Response for GetCoordinationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoordinationV1beta1APIResourcesResponse`]`>` constructor, or [`GetCoordinationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_coordination_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/coordination.k8s.io/v1beta1/".to_owned(); @@ -1688,12 +1774,14 @@ pub fn get_coordination_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_coordination_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoordinationV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoordinationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1728,6 +1816,7 @@ impl crate::Response for GetCoordinationV1beta1APIResourcesResponse { /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreAPIVersionsResponse`]`>` constructor, or [`GetCoreAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/".to_owned(); @@ -1741,12 +1830,14 @@ pub fn get_core_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreAPIVersionsResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIVersions), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1781,6 +1872,7 @@ impl crate::Response for GetCoreAPIVersionsResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreV1APIResourcesResponse`]`>` constructor, or [`GetCoreV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/v1/".to_owned(); @@ -1794,12 +1886,14 @@ pub fn get_core_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreV1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1834,6 +1928,7 @@ impl crate::Response for GetCoreV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsAPIGroupResponse`]`>` constructor, or [`GetEventsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/".to_owned(); @@ -1847,12 +1942,14 @@ pub fn get_events_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1887,6 +1984,7 @@ impl crate::Response for GetEventsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsV1beta1APIResourcesResponse`]`>` constructor, or [`GetEventsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/v1beta1/".to_owned(); @@ -1900,12 +1998,14 @@ pub fn get_events_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1940,6 +2040,7 @@ impl crate::Response for GetEventsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsAPIGroupResponse`]`>` constructor, or [`GetExtensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/".to_owned(); @@ -1953,12 +2054,14 @@ pub fn get_extensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1993,6 +2096,7 @@ impl crate::Response for GetExtensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetExtensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/v1beta1/".to_owned(); @@ -2006,12 +2110,14 @@ pub fn get_extensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2046,6 +2152,7 @@ impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingAPIGroupResponse`]`>` constructor, or [`GetNetworkingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/".to_owned(); @@ -2059,12 +2166,14 @@ pub fn get_networking_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2099,6 +2208,7 @@ impl crate::Response for GetNetworkingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingV1APIResourcesResponse`]`>` constructor, or [`GetNetworkingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/v1/".to_owned(); @@ -2112,12 +2222,14 @@ pub fn get_networking_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingV1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2152,6 +2264,7 @@ impl crate::Response for GetNetworkingV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyAPIGroupResponse`]`>` constructor, or [`GetPolicyAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/".to_owned(); @@ -2165,12 +2278,14 @@ pub fn get_policy_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2205,6 +2320,7 @@ impl crate::Response for GetPolicyAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyV1beta1APIResourcesResponse`]`>` constructor, or [`GetPolicyV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/v1beta1/".to_owned(); @@ -2218,12 +2334,14 @@ pub fn get_policy_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2258,6 +2376,7 @@ impl crate::Response for GetPolicyV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationAPIGroupResponse`]`>` constructor, or [`GetRbacAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/".to_owned(); @@ -2271,12 +2390,14 @@ pub fn get_rbac_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2311,6 +2432,7 @@ impl crate::Response for GetRbacAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1/".to_owned(); @@ -2324,12 +2446,14 @@ pub fn get_rbac_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2364,6 +2488,7 @@ impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1alpha1/".to_owned(); @@ -2377,12 +2502,14 @@ pub fn get_rbac_authorization_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1alpha1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2417,6 +2544,7 @@ impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1beta1/".to_owned(); @@ -2430,12 +2558,14 @@ pub fn get_rbac_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2470,6 +2600,7 @@ impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingAPIGroupResponse`]`>` constructor, or [`GetSchedulingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/".to_owned(); @@ -2483,12 +2614,14 @@ pub fn get_scheduling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2523,6 +2656,7 @@ impl crate::Response for GetSchedulingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1alpha1/".to_owned(); @@ -2536,12 +2670,14 @@ pub fn get_scheduling_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1alpha1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2576,6 +2712,7 @@ impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1beta1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1beta1/".to_owned(); @@ -2589,12 +2726,14 @@ pub fn get_scheduling_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2629,6 +2768,7 @@ impl crate::Response for GetSchedulingV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsAPIGroupResponse`]`>` constructor, or [`GetSettingsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/".to_owned(); @@ -2642,12 +2782,14 @@ pub fn get_settings_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2682,6 +2824,7 @@ impl crate::Response for GetSettingsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSettingsV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/v1alpha1/".to_owned(); @@ -2695,12 +2838,14 @@ pub fn get_settings_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsV1alpha1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2735,6 +2880,7 @@ impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageAPIGroupResponse`]`>` constructor, or [`GetStorageAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/".to_owned(); @@ -2748,12 +2894,14 @@ pub fn get_storage_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageAPIGroupResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2788,6 +2936,7 @@ impl crate::Response for GetStorageAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1APIResourcesResponse`]`>` constructor, or [`GetStorageV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1/".to_owned(); @@ -2801,12 +2950,14 @@ pub fn get_storage_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2841,6 +2992,7 @@ impl crate::Response for GetStorageV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1alpha1APIResourcesResponse`]`>` constructor, or [`GetStorageV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1alpha1/".to_owned(); @@ -2854,12 +3006,14 @@ pub fn get_storage_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1alpha1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2894,6 +3048,7 @@ impl crate::Response for GetStorageV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1beta1APIResourcesResponse`]`>` constructor, or [`GetStorageV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1beta1/".to_owned(); @@ -2907,12 +3062,14 @@ pub fn get_storage_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1beta1APIResourcesResponse { Ok(crate::v1_12::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2951,6 +3108,7 @@ impl crate::Response for GetStorageV1beta1APIResourcesResponse { /// * `logpath` /// /// path to the log +#[cfg(feature = "api")] pub fn log_file_handler( logpath: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2967,11 +3125,13 @@ pub fn log_file_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2996,6 +3156,7 @@ impl crate::Response for LogFileHandlerResponse { // Generated from operation logFileListHandler /// Use the returned [`crate::ResponseBody`]`<`[`LogFileListHandlerResponse`]`>` constructor, or [`LogFileListHandlerResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn log_file_list_handler( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/logs/".to_owned(); @@ -3009,11 +3170,13 @@ pub fn log_file_list_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_list_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileListHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileListHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/admissionregistration/v1alpha1/initializer_configuration.rs b/src/v1_13/api/admissionregistration/v1alpha1/initializer_configuration.rs index 3ab676e942..d8c36f23aa 100644 --- a/src/v1_13/api/admissionregistration/v1alpha1/initializer_configuration.rs +++ b/src/v1_13/api/admissionregistration/v1alpha1/initializer_configuration.rs @@ -26,6 +26,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_initializer_configuration( body: &crate::v1_13::api::admissionregistration::v1alpha1::InitializerConfiguration, optional: CreateInitializerConfigurationOptional<'_>, @@ -59,6 +60,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateInitializerConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateInitializerConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1alpha1::InitializerConfiguration), @@ -78,6 +81,7 @@ pub enum CreateInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl InitializerConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_initializer_configuration( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -159,6 +164,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_collection_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionInitializerConfigurationResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_initializer_configuration( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteInitializerConfigurationResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_initializer_configuration( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::list_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListInitializerConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1alpha1::InitializerConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_initializer_configuration( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::patch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchInitializerConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_initializer_configuration( name: &str, optional: ReadInitializerConfigurationOptional<'_>, @@ -498,6 +515,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadInitializerConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -509,12 +527,14 @@ pub struct ReadInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadInitializerConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_initializer_configuration( name: &str, body: &crate::v1_13::api::admissionregistration::v1alpha1::InitializerConfiguration, @@ -594,6 +615,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceInitializerConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -603,6 +625,7 @@ pub struct ReplaceInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceInitializerConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1alpha1::InitializerConfiguration), @@ -610,6 +633,7 @@ pub enum ReplaceInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_initializer_configuration( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -679,12 +704,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::watch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchInitializerConfigurationResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/admissionregistration/v1alpha1/mod.rs b/src/v1_13/api/admissionregistration/v1alpha1/mod.rs index b1ef774c7b..2657f18e2f 100644 --- a/src/v1_13/api/admissionregistration/v1alpha1/mod.rs +++ b/src/v1_13/api/admissionregistration/v1alpha1/mod.rs @@ -1,28 +1,20 @@ mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializer_configuration; -pub use self::initializer_configuration::{ - InitializerConfiguration, - CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse, - DeleteCollectionInitializerConfigurationResponse, - DeleteInitializerConfigurationResponse, - ListInitializerConfigurationResponse, - PatchInitializerConfigurationResponse, - ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse, - ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse, - WatchInitializerConfigurationResponse, -}; +pub use self::initializer_configuration::InitializerConfiguration; +#[cfg(feature = "api")] pub use self::initializer_configuration::{CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteCollectionInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::ListInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::PatchInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::WatchInitializerConfigurationResponse; mod initializer_configuration_list; -pub use self::initializer_configuration_list::{ - InitializerConfigurationList, -}; +pub use self::initializer_configuration_list::InitializerConfigurationList; mod rule; -pub use self::rule::{ - Rule, -}; +pub use self::rule::Rule; diff --git a/src/v1_13/api/admissionregistration/v1beta1/mod.rs b/src/v1_13/api/admissionregistration/v1beta1/mod.rs index 9e4dd8f5a8..7dd5906135 100644 --- a/src/v1_13/api/admissionregistration/v1beta1/mod.rs +++ b/src/v1_13/api/admissionregistration/v1beta1/mod.rs @@ -1,56 +1,40 @@ mod mutating_webhook_configuration; -pub use self::mutating_webhook_configuration::{ - MutatingWebhookConfiguration, - CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse, - DeleteCollectionMutatingWebhookConfigurationResponse, - DeleteMutatingWebhookConfigurationResponse, - ListMutatingWebhookConfigurationResponse, - PatchMutatingWebhookConfigurationResponse, - ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse, - ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse, - WatchMutatingWebhookConfigurationResponse, -}; +pub use self::mutating_webhook_configuration::MutatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteCollectionMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::ListMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::PatchMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::WatchMutatingWebhookConfigurationResponse; mod mutating_webhook_configuration_list; -pub use self::mutating_webhook_configuration_list::{ - MutatingWebhookConfigurationList, -}; +pub use self::mutating_webhook_configuration_list::MutatingWebhookConfigurationList; mod rule_with_operations; -pub use self::rule_with_operations::{ - RuleWithOperations, -}; +pub use self::rule_with_operations::RuleWithOperations; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod validating_webhook_configuration; -pub use self::validating_webhook_configuration::{ - ValidatingWebhookConfiguration, - CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse, - DeleteCollectionValidatingWebhookConfigurationResponse, - DeleteValidatingWebhookConfigurationResponse, - ListValidatingWebhookConfigurationResponse, - PatchValidatingWebhookConfigurationResponse, - ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse, - ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse, - WatchValidatingWebhookConfigurationResponse, -}; +pub use self::validating_webhook_configuration::ValidatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteCollectionValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::ListValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::PatchValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::WatchValidatingWebhookConfigurationResponse; mod validating_webhook_configuration_list; -pub use self::validating_webhook_configuration_list::{ - ValidatingWebhookConfigurationList, -}; +pub use self::validating_webhook_configuration_list::ValidatingWebhookConfigurationList; mod webhook; -pub use self::webhook::{ - Webhook, -}; +pub use self::webhook::Webhook; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; diff --git a/src/v1_13/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs b/src/v1_13/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs index 2ffb61b3b7..d1da2a7522 100644 --- a/src/v1_13/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs +++ b/src/v1_13/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_mutating_webhook_configuration( body: &crate::v1_13::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, optional: CreateMutatingWebhookConfigurationOptional<'_>, @@ -59,6 +60,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateMutatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateMutatingWebhookConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -78,6 +81,7 @@ pub enum CreateMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl MutatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_mutating_webhook_configuration( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -159,6 +164,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_collection_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionMutatingWebhookConfigurationResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_mutating_webhook_configuration( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteMutatingWebhookConfigurationResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_mutating_webhook_configuration( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::list_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListMutatingWebhookConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1beta1::MutatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_mutating_webhook_configuration( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::patch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchMutatingWebhookConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_mutating_webhook_configuration( name: &str, optional: ReadMutatingWebhookConfigurationOptional<'_>, @@ -498,6 +515,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadMutatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -509,12 +527,14 @@ pub struct ReadMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadMutatingWebhookConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_mutating_webhook_configuration( name: &str, body: &crate::v1_13::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, @@ -594,6 +615,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -603,6 +625,7 @@ pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceMutatingWebhookConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -610,6 +633,7 @@ pub enum ReplaceMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_mutating_webhook_configuration( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -679,12 +704,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::watch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchMutatingWebhookConfigurationResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/admissionregistration/v1beta1/validating_webhook_configuration.rs b/src/v1_13/api/admissionregistration/v1beta1/validating_webhook_configuration.rs index 98e4295656..04c5680094 100644 --- a/src/v1_13/api/admissionregistration/v1beta1/validating_webhook_configuration.rs +++ b/src/v1_13/api/admissionregistration/v1beta1/validating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_validating_webhook_configuration( body: &crate::v1_13::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, optional: CreateValidatingWebhookConfigurationOptional<'_>, @@ -59,6 +60,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateValidatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateValidatingWebhookConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -78,6 +81,7 @@ pub enum CreateValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl ValidatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_validating_webhook_configuration( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -159,6 +164,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_collection_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionValidatingWebhookConfigurationResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_validating_webhook_configuration( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteValidatingWebhookConfigurationResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_validating_webhook_configuration( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::list_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListValidatingWebhookConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1beta1::ValidatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_validating_webhook_configuration( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::patch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchValidatingWebhookConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_validating_webhook_configuration( name: &str, optional: ReadValidatingWebhookConfigurationOptional<'_>, @@ -498,6 +515,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadValidatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -509,12 +527,14 @@ pub struct ReadValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadValidatingWebhookConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_validating_webhook_configuration( name: &str, body: &crate::v1_13::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, @@ -594,6 +615,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -603,6 +625,7 @@ pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceValidatingWebhookConfigurationResponse { Ok(crate::v1_13::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -610,6 +633,7 @@ pub enum ReplaceValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_validating_webhook_configuration( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -679,12 +704,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::watch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchValidatingWebhookConfigurationResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1/controller_revision.rs b/src/v1_13/api/apps/v1/controller_revision.rs index 04437e3dc3..6aea0ce327 100644 --- a/src/v1_13/api/apps/v1/controller_revision.rs +++ b/src/v1_13/api/apps/v1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_13::api::apps::v1::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -709,6 +733,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -718,6 +743,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1::ControllerRevision), @@ -725,6 +751,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -776,6 +803,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -794,12 +822,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -870,12 +901,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1/daemon_set.rs b/src/v1_13/api/apps/v1/daemon_set.rs index f5a8e6a1d3..79074e2539 100644 --- a/src/v1_13/api/apps/v1/daemon_set.rs +++ b/src/v1_13/api/apps/v1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_13::api::apps::v1::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_13::api::apps::v1::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_13::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_13::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_13::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_13::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_13::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_13::api::apps::v1::DaemonSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_13::api::apps::v1::DaemonSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1/deployment.rs b/src/v1_13/api/apps/v1/deployment.rs index 5790c29506..a61a4e874b 100644 --- a/src/v1_13/api/apps/v1/deployment.rs +++ b/src/v1_13/api/apps/v1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_13::api::apps::v1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1::Deployment), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::apps::v1::Deployment), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1/mod.rs b/src/v1_13/api/apps/v1/mod.rs index a25b916f02..971a3fb358 100644 --- a/src/v1_13/api/apps/v1/mod.rs +++ b/src/v1_13/api/apps/v1/mod.rs @@ -1,202 +1,146 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_13/api/apps/v1/replica_set.rs b/src/v1_13/api/apps/v1/replica_set.rs index 009ae75ed9..0f246025fb 100644 --- a/src/v1_13/api/apps/v1/replica_set.rs +++ b/src/v1_13/api/apps/v1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_13::api::apps::v1::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_13::api::apps::v1::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_13::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_13::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_13::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_13::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_13::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_13::api::apps::v1::ReplicaSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_13::api::apps::v1::ReplicaSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1/stateful_set.rs b/src/v1_13/api/apps/v1/stateful_set.rs index 532b39a58e..5404f7e2ae 100644 --- a/src/v1_13/api/apps/v1/stateful_set.rs +++ b/src/v1_13/api/apps/v1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_13::api::apps::v1::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_13::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_13::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -887,6 +918,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -896,6 +928,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1::StatefulSet), @@ -903,6 +936,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -962,6 +996,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -996,6 +1031,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1005,6 +1041,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_13::api::apps::v1::StatefulSet), @@ -1012,6 +1049,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1067,6 +1105,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1088,12 +1127,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1139,6 +1180,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1157,12 +1199,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1beta1/controller_revision.rs b/src/v1_13/api/apps/v1beta1/controller_revision.rs index beb59b4348..48075f1384 100644 --- a/src/v1_13/api/apps/v1beta1/controller_revision.rs +++ b/src/v1_13/api/apps/v1beta1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_13::api::apps::v1beta1::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1beta1::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -709,6 +733,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -718,6 +743,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1beta1::ControllerRevision), @@ -725,6 +751,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -776,6 +803,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -794,12 +822,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -870,12 +901,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1beta1/deployment.rs b/src/v1_13/api/apps/v1beta1/deployment.rs index 62d461e04e..d158cc7ebe 100644 --- a/src/v1_13/api/apps/v1beta1/deployment.rs +++ b/src/v1_13/api/apps/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_13::api::apps::v1beta1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1beta1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1beta1::Deployment), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::apps::v1beta1::Deployment), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1beta1/deployment_rollback.rs b/src/v1_13/api/apps/v1beta1/deployment_rollback.rs index b344c7cf78..2d4cc1cff5 100644 --- a/src/v1_13/api/apps/v1beta1/deployment_rollback.rs +++ b/src/v1_13/api/apps/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -75,6 +76,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -86,6 +88,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -94,6 +97,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1beta1/mod.rs b/src/v1_13/api/apps/v1beta1/mod.rs index 93facd2f47..94ca19493a 100644 --- a/src/v1_13/api/apps/v1beta1/mod.rs +++ b/src/v1_13/api/apps/v1beta1/mod.rs @@ -1,148 +1,106 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_13/api/apps/v1beta1/scale.rs b/src/v1_13/api/apps/v1beta1/scale.rs index acc487cb81..8e14f3c69f 100644 --- a/src/v1_13/api/apps/v1beta1/scale.rs +++ b/src/v1_13/api/apps/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_13::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -207,6 +213,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -235,6 +242,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -242,12 +250,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -325,6 +336,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -332,12 +344,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_13::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +403,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -423,6 +438,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -432,6 +448,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::apps::v1beta1::Scale), @@ -439,6 +456,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -498,6 +516,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -532,6 +551,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -541,6 +561,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_13::api::apps::v1beta1::Scale), @@ -548,6 +569,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1beta1/stateful_set.rs b/src/v1_13/api/apps/v1beta1/stateful_set.rs index 8a8b776513..87f54c6927 100644 --- a/src/v1_13/api/apps/v1beta1/stateful_set.rs +++ b/src/v1_13/api/apps/v1beta1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_13::api::apps::v1beta1::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1beta1::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -887,6 +918,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -896,6 +928,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1beta1::StatefulSet), @@ -903,6 +936,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -962,6 +996,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -996,6 +1031,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1005,6 +1041,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta1::StatefulSet), @@ -1012,6 +1049,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1067,6 +1105,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1088,12 +1127,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1139,6 +1180,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1157,12 +1199,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1beta2/controller_revision.rs b/src/v1_13/api/apps/v1beta2/controller_revision.rs index 021f864814..be96cd4b8d 100644 --- a/src/v1_13/api/apps/v1beta2/controller_revision.rs +++ b/src/v1_13/api/apps/v1beta2/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_13::api::apps::v1beta2::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1beta2::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -709,6 +733,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -718,6 +743,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_13::api::apps::v1beta2::ControllerRevision), @@ -725,6 +751,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -776,6 +803,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -794,12 +822,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -870,12 +901,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1beta2/daemon_set.rs b/src/v1_13/api/apps/v1beta2/daemon_set.rs index 0e26bde155..2130d907ba 100644 --- a/src/v1_13/api/apps/v1beta2/daemon_set.rs +++ b/src/v1_13/api/apps/v1beta2/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_13::api::apps::v1beta2::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_13::api::apps::v1beta2::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_13::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_13::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_13::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_13::api::apps::v1beta2::DaemonSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::DaemonSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1beta2/deployment.rs b/src/v1_13/api/apps/v1beta2/deployment.rs index a4626455f1..cf4967ec3f 100644 --- a/src/v1_13/api/apps/v1beta2/deployment.rs +++ b/src/v1_13/api/apps/v1beta2/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_13::api::apps::v1beta2::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1beta2::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_13::api::apps::v1beta2::Deployment), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::Deployment), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1beta2/mod.rs b/src/v1_13/api/apps/v1beta2/mod.rs index a95884f4d6..60c611aefd 100644 --- a/src/v1_13/api/apps/v1beta2/mod.rs +++ b/src/v1_13/api/apps/v1beta2/mod.rs @@ -1,226 +1,164 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_13/api/apps/v1beta2/replica_set.rs b/src/v1_13/api/apps/v1beta2/replica_set.rs index 0f57e6ecac..ccf4a98619 100644 --- a/src/v1_13/api/apps/v1beta2/replica_set.rs +++ b/src/v1_13/api/apps/v1beta2/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_13::api::apps::v1beta2::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_13::api::apps::v1beta2::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_13::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_13::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_13::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_13::api::apps::v1beta2::ReplicaSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::ReplicaSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1beta2/scale.rs b/src/v1_13/api/apps/v1beta2/scale.rs index 622691d913..617d4e36a8 100644 --- a/src/v1_13/api/apps/v1beta2/scale.rs +++ b/src/v1_13/api/apps/v1beta2/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_13::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_13::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_13::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_13::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -599,6 +621,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -608,6 +631,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::apps::v1beta2::Scale), @@ -615,6 +639,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -674,6 +699,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -708,6 +734,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -717,6 +744,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_13::api::apps::v1beta2::Scale), @@ -724,6 +752,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +812,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -817,6 +847,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -826,6 +857,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_13::api::apps::v1beta2::Scale), @@ -833,6 +865,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/apps/v1beta2/stateful_set.rs b/src/v1_13/api/apps/v1beta2/stateful_set.rs index 60f9f5b025..f1b24e159c 100644 --- a/src/v1_13/api/apps/v1beta2/stateful_set.rs +++ b/src/v1_13/api/apps/v1beta2/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_13::api::apps::v1beta2::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1beta2::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_13::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -887,6 +918,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -896,6 +928,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_13::api::apps::v1beta2::StatefulSet), @@ -903,6 +936,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -962,6 +996,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -996,6 +1031,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1005,6 +1041,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_13::api::apps::v1beta2::StatefulSet), @@ -1012,6 +1049,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1067,6 +1105,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1088,12 +1127,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1139,6 +1180,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1157,12 +1199,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/auditregistration/v1alpha1/audit_sink.rs b/src/v1_13/api/auditregistration/v1alpha1/audit_sink.rs index c7788cb8de..e70e9b81d2 100644 --- a/src/v1_13/api/auditregistration/v1alpha1/audit_sink.rs +++ b/src/v1_13/api/auditregistration/v1alpha1/audit_sink.rs @@ -25,6 +25,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_audit_sink( body: &crate::v1_13::api::auditregistration::v1alpha1::AuditSink, optional: CreateAuditSinkOptional<'_>, @@ -58,6 +59,7 @@ impl AuditSink { } /// Optional parameters of [`AuditSink::create_audit_sink`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAuditSinkOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -69,6 +71,7 @@ pub struct CreateAuditSinkOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::create_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAuditSinkResponse { Ok(crate::v1_13::api::auditregistration::v1alpha1::AuditSink), @@ -77,6 +80,7 @@ pub enum CreateAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_audit_sink( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -157,6 +162,7 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::delete_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAuditSinkResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -165,6 +171,7 @@ pub enum DeleteAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -231,6 +238,7 @@ impl AuditSink { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_audit_sink( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -251,6 +259,7 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::delete_collection_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAuditSinkResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteCollectionAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -314,6 +324,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_audit_sink( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -332,12 +343,14 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::list_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAuditSinkResponse { Ok(crate::v1_13::api::auditregistration::v1alpha1::AuditSinkList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -385,6 +398,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_audit_sink( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -412,12 +426,14 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::patch_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAuditSinkResponse { Ok(crate::v1_13::api::auditregistration::v1alpha1::AuditSink), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_audit_sink( name: &str, optional: ReadAuditSinkOptional<'_>, @@ -497,6 +514,7 @@ impl AuditSink { } /// Optional parameters of [`AuditSink::read_audit_sink`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAuditSinkOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -508,12 +526,14 @@ pub struct ReadAuditSinkOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::read_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAuditSinkResponse { Ok(crate::v1_13::api::auditregistration::v1alpha1::AuditSink), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -561,6 +581,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_audit_sink( name: &str, body: &crate::v1_13::api::auditregistration::v1alpha1::AuditSink, @@ -593,6 +614,7 @@ impl AuditSink { } /// Optional parameters of [`AuditSink::replace_audit_sink`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAuditSinkOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -602,6 +624,7 @@ pub struct ReplaceAuditSinkOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::replace_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAuditSinkResponse { Ok(crate::v1_13::api::auditregistration::v1alpha1::AuditSink), @@ -609,6 +632,7 @@ pub enum ReplaceAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +684,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_audit_sink( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -678,12 +703,14 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::watch_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAuditSinkResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/auditregistration/v1alpha1/mod.rs b/src/v1_13/api/auditregistration/v1alpha1/mod.rs index 3db2282342..184bc96846 100644 --- a/src/v1_13/api/auditregistration/v1alpha1/mod.rs +++ b/src/v1_13/api/auditregistration/v1alpha1/mod.rs @@ -1,48 +1,32 @@ mod audit_sink; -pub use self::audit_sink::{ - AuditSink, - CreateAuditSinkOptional, CreateAuditSinkResponse, - DeleteAuditSinkResponse, - DeleteCollectionAuditSinkResponse, - ListAuditSinkResponse, - PatchAuditSinkResponse, - ReadAuditSinkOptional, ReadAuditSinkResponse, - ReplaceAuditSinkOptional, ReplaceAuditSinkResponse, - WatchAuditSinkResponse, -}; +pub use self::audit_sink::AuditSink; +#[cfg(feature = "api")] pub use self::audit_sink::{CreateAuditSinkOptional, CreateAuditSinkResponse}; +#[cfg(feature = "api")] pub use self::audit_sink::DeleteAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::DeleteCollectionAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::ListAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::PatchAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::{ReadAuditSinkOptional, ReadAuditSinkResponse}; +#[cfg(feature = "api")] pub use self::audit_sink::{ReplaceAuditSinkOptional, ReplaceAuditSinkResponse}; +#[cfg(feature = "api")] pub use self::audit_sink::WatchAuditSinkResponse; mod audit_sink_list; -pub use self::audit_sink_list::{ - AuditSinkList, -}; +pub use self::audit_sink_list::AuditSinkList; mod audit_sink_spec; -pub use self::audit_sink_spec::{ - AuditSinkSpec, -}; +pub use self::audit_sink_spec::AuditSinkSpec; mod policy; -pub use self::policy::{ - Policy, -}; +pub use self::policy::Policy; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod webhook; -pub use self::webhook::{ - Webhook, -}; +pub use self::webhook::Webhook; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; mod webhook_throttle_config; -pub use self::webhook_throttle_config::{ - WebhookThrottleConfig, -}; +pub use self::webhook_throttle_config::WebhookThrottleConfig; diff --git a/src/v1_13/api/authentication/v1/mod.rs b/src/v1_13/api/authentication/v1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_13/api/authentication/v1/mod.rs +++ b/src/v1_13/api/authentication/v1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_13/api/authentication/v1/token_review.rs b/src/v1_13/api/authentication/v1/token_review.rs index 1a9e80c916..56e9833911 100644 --- a/src/v1_13/api/authentication/v1/token_review.rs +++ b/src/v1_13/api/authentication/v1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_13::api::authentication::v1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -61,6 +62,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_13::api::authentication::v1::TokenReview), @@ -80,6 +83,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/authentication/v1beta1/mod.rs b/src/v1_13/api/authentication/v1beta1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_13/api/authentication/v1beta1/mod.rs +++ b/src/v1_13/api/authentication/v1beta1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_13/api/authentication/v1beta1/token_review.rs b/src/v1_13/api/authentication/v1beta1/token_review.rs index 9fbe86e2ca..d5e6eef6f4 100644 --- a/src/v1_13/api/authentication/v1beta1/token_review.rs +++ b/src/v1_13/api/authentication/v1beta1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_13::api::authentication::v1beta1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -61,6 +62,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_13::api::authentication::v1beta1::TokenReview), @@ -80,6 +83,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/authorization/v1/local_subject_access_review.rs b/src/v1_13/api/authorization/v1/local_subject_access_review.rs index 4ac4d704ef..3c822878a8 100644 --- a/src/v1_13/api/authorization/v1/local_subject_access_review.rs +++ b/src/v1_13/api/authorization/v1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_13::api::authorization::v1::LocalSubjectAccessReview, @@ -68,6 +69,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_13::api::authorization::v1::LocalSubjectAccessReview), @@ -87,6 +90,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/authorization/v1/mod.rs b/src/v1_13/api/authorization/v1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_13/api/authorization/v1/mod.rs +++ b/src/v1_13/api/authorization/v1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_13/api/authorization/v1/self_subject_access_review.rs b/src/v1_13/api/authorization/v1/self_subject_access_review.rs index d4d7fba4b4..8de3a3b149 100644 --- a/src/v1_13/api/authorization/v1/self_subject_access_review.rs +++ b/src/v1_13/api/authorization/v1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_13::api::authorization::v1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_13::api::authorization::v1::SelfSubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/authorization/v1/self_subject_rules_review.rs b/src/v1_13/api/authorization/v1/self_subject_rules_review.rs index a94652d617..67137ca81a 100644 --- a/src/v1_13/api/authorization/v1/self_subject_rules_review.rs +++ b/src/v1_13/api/authorization/v1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_13::api::authorization::v1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_13::api::authorization::v1::SelfSubjectRulesReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/authorization/v1/subject_access_review.rs b/src/v1_13/api/authorization/v1/subject_access_review.rs index 6f75cdda44..4fb4d2ba8a 100644 --- a/src/v1_13/api/authorization/v1/subject_access_review.rs +++ b/src/v1_13/api/authorization/v1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_13::api::authorization::v1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_13::api::authorization::v1::SubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/authorization/v1beta1/local_subject_access_review.rs b/src/v1_13/api/authorization/v1beta1/local_subject_access_review.rs index bf71b78503..d68ca835e9 100644 --- a/src/v1_13/api/authorization/v1beta1/local_subject_access_review.rs +++ b/src/v1_13/api/authorization/v1beta1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_13::api::authorization::v1beta1::LocalSubjectAccessReview, @@ -68,6 +69,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_13::api::authorization::v1beta1::LocalSubjectAccessReview), @@ -87,6 +90,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/authorization/v1beta1/mod.rs b/src/v1_13/api/authorization/v1beta1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_13/api/authorization/v1beta1/mod.rs +++ b/src/v1_13/api/authorization/v1beta1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_13/api/authorization/v1beta1/self_subject_access_review.rs b/src/v1_13/api/authorization/v1beta1/self_subject_access_review.rs index 4ac278aeeb..8ac7232c39 100644 --- a/src/v1_13/api/authorization/v1beta1/self_subject_access_review.rs +++ b/src/v1_13/api/authorization/v1beta1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_13::api::authorization::v1beta1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_13::api::authorization::v1beta1::SelfSubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/authorization/v1beta1/self_subject_rules_review.rs b/src/v1_13/api/authorization/v1beta1/self_subject_rules_review.rs index e2567af4c4..c907cb4c8a 100644 --- a/src/v1_13/api/authorization/v1beta1/self_subject_rules_review.rs +++ b/src/v1_13/api/authorization/v1beta1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_13::api::authorization::v1beta1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_13::api::authorization::v1beta1::SelfSubjectRulesReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/authorization/v1beta1/subject_access_review.rs b/src/v1_13/api/authorization/v1beta1/subject_access_review.rs index 6049cea797..ebe208d4aa 100644 --- a/src/v1_13/api/authorization/v1beta1/subject_access_review.rs +++ b/src/v1_13/api/authorization/v1beta1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_13::api::authorization::v1beta1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_13::api::authorization::v1beta1::SubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/autoscaling/v1/horizontal_pod_autoscaler.rs b/src/v1_13/api/autoscaling/v1/horizontal_pod_autoscaler.rs index 4c1eeaa8b0..7d4d6cee67 100644 --- a/src/v1_13/api/autoscaling/v1/horizontal_pod_autoscaler.rs +++ b/src/v1_13/api/autoscaling/v1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_13::api::autoscaling::v1::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_13::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_13::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_13::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_13::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/autoscaling/v1/mod.rs b/src/v1_13/api/autoscaling/v1/mod.rs index a4f7a0312d..09ed1f1487 100644 --- a/src/v1_13/api/autoscaling/v1/mod.rs +++ b/src/v1_13/api/autoscaling/v1/mod.rs @@ -1,65 +1,49 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - PatchNamespacedReplicationControllerScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, - ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; diff --git a/src/v1_13/api/autoscaling/v1/scale.rs b/src/v1_13/api/autoscaling/v1/scale.rs index e227afebef..ec1f96aaac 100644 --- a/src/v1_13/api/autoscaling/v1/scale.rs +++ b/src/v1_13/api/autoscaling/v1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -295,6 +304,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -324,12 +334,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -379,6 +391,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -407,6 +420,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -414,12 +428,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -497,6 +514,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -504,12 +522,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -559,6 +579,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -587,6 +608,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -594,12 +616,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -649,6 +673,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -677,6 +702,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -684,12 +710,14 @@ pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +769,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -775,6 +804,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -784,6 +814,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), @@ -791,6 +822,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -850,6 +882,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -884,6 +917,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -893,6 +927,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), @@ -900,6 +935,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -959,6 +995,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -993,6 +1030,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1002,6 +1040,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), @@ -1009,6 +1048,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1068,6 +1108,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -1102,6 +1143,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1111,6 +1153,7 @@ pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerScaleResponse { Ok(crate::v1_13::api::autoscaling::v1::Scale), @@ -1118,6 +1161,7 @@ pub enum ReplaceNamespacedReplicationControllerScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs b/src/v1_13/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs index 1da330a269..3b221c65fc 100644 --- a/src/v1_13/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs +++ b/src/v1_13/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_13::api::autoscaling::v2beta1::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_13::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_13::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_13::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_13::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/autoscaling/v2beta1/mod.rs b/src/v1_13/api/autoscaling/v2beta1/mod.rs index edb3c1e242..83788a8cb3 100644 --- a/src/v1_13/api/autoscaling/v2beta1/mod.rs +++ b/src/v1_13/api/autoscaling/v2beta1/mod.rs @@ -1,93 +1,61 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod external_metric_source; -pub use self::external_metric_source::{ - ExternalMetricSource, -}; +pub use self::external_metric_source::ExternalMetricSource; mod external_metric_status; -pub use self::external_metric_status::{ - ExternalMetricStatus, -}; +pub use self::external_metric_status::ExternalMetricStatus; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_13/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs b/src/v1_13/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs index 1a3af9eafc..82d4ce0334 100644 --- a/src/v1_13/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs +++ b/src/v1_13/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_13::api::autoscaling::v2beta2::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_13::api::autoscaling::v2beta2::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v2beta2::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_13::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_13::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_13::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/autoscaling/v2beta2/mod.rs b/src/v1_13/api/autoscaling/v2beta2/mod.rs index 5823acde4f..2de8195cc9 100644 --- a/src/v1_13/api/autoscaling/v2beta2/mod.rs +++ b/src/v1_13/api/autoscaling/v2beta2/mod.rs @@ -1,108 +1,70 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod external_metric_source; -pub use self::external_metric_source::{ - ExternalMetricSource, -}; +pub use self::external_metric_source::ExternalMetricSource; mod external_metric_status; -pub use self::external_metric_status::{ - ExternalMetricStatus, -}; +pub use self::external_metric_status::ExternalMetricStatus; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_identifier; -pub use self::metric_identifier::{ - MetricIdentifier, -}; +pub use self::metric_identifier::MetricIdentifier; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod metric_target; -pub use self::metric_target::{ - MetricTarget, -}; +pub use self::metric_target::MetricTarget; mod metric_value_status; -pub use self::metric_value_status::{ - MetricValueStatus, -}; +pub use self::metric_value_status::MetricValueStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_13/api/batch/v1/job.rs b/src/v1_13/api/batch/v1/job.rs index 39754f10f0..d2b1b15051 100644 --- a/src/v1_13/api/batch/v1/job.rs +++ b/src/v1_13/api/batch/v1/job.rs @@ -33,6 +33,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_job( namespace: &str, body: &crate::v1_13::api::batch::v1::Job, @@ -69,6 +70,7 @@ impl Job { } /// Optional parameters of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedJobResponse { Ok(crate::v1_13::api::batch::v1::Job), @@ -88,6 +91,7 @@ pub enum CreateNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Job { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_job( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_collection_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedJobResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedJobResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_job_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListJobForAllNamespacesResponse { Ok(crate::v1_13::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_job( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedJobResponse { Ok(crate::v1_13::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobResponse { Ok(crate::v1_13::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobStatusResponse { Ok(crate::v1_13::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobResponse { Ok(crate::v1_13::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobStatusResponse { Ok(crate::v1_13::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobResponse { Ok(crate::v1_13::api::batch::v1::Job), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobStatusResponse { Ok(crate::v1_13::api::batch::v1::Job), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_job_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchJobForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_job( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedJobResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/batch/v1/mod.rs b/src/v1_13/api/batch/v1/mod.rs index 68e7a18867..97d7bccb74 100644 --- a/src/v1_13/api/batch/v1/mod.rs +++ b/src/v1_13/api/batch/v1/mod.rs @@ -1,38 +1,28 @@ mod job; -pub use self::job::{ - Job, - CreateNamespacedJobOptional, CreateNamespacedJobResponse, - DeleteCollectionNamespacedJobResponse, - DeleteNamespacedJobResponse, - ListJobForAllNamespacesResponse, - ListNamespacedJobResponse, - PatchNamespacedJobResponse, - PatchNamespacedJobStatusResponse, - ReadNamespacedJobOptional, ReadNamespacedJobResponse, - ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse, - ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse, - ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse, - WatchJobForAllNamespacesResponse, - WatchNamespacedJobResponse, -}; +pub use self::job::Job; +#[cfg(feature = "api")] pub use self::job::{CreateNamespacedJobOptional, CreateNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::DeleteCollectionNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::DeleteNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::ListJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::ListNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobStatusResponse; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobOptional, ReadNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::WatchJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::WatchNamespacedJobResponse; mod job_condition; -pub use self::job_condition::{ - JobCondition, -}; +pub use self::job_condition::JobCondition; mod job_list; -pub use self::job_list::{ - JobList, -}; +pub use self::job_list::JobList; mod job_spec; -pub use self::job_spec::{ - JobSpec, -}; +pub use self::job_spec::JobSpec; mod job_status; -pub use self::job_status::{ - JobStatus, -}; +pub use self::job_status::JobStatus; diff --git a/src/v1_13/api/batch/v1beta1/cron_job.rs b/src/v1_13/api/batch/v1beta1/cron_job.rs index e6d99f9f57..0aa0c72e7d 100644 --- a/src/v1_13/api/batch/v1beta1/cron_job.rs +++ b/src/v1_13/api/batch/v1beta1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_13::api::batch::v1beta1::CronJob, @@ -69,6 +70,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_13::api::batch::v1beta1::CronJob), @@ -88,6 +91,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_13::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_13::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_13::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_13::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_13::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_13::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_13::api::batch::v1beta1::CronJob), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_13::api::batch::v1beta1::CronJob), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/batch/v1beta1/mod.rs b/src/v1_13/api/batch/v1beta1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_13/api/batch/v1beta1/mod.rs +++ b/src/v1_13/api/batch/v1beta1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_13/api/batch/v2alpha1/cron_job.rs b/src/v1_13/api/batch/v2alpha1/cron_job.rs index 49c0539214..8ac65324cf 100644 --- a/src/v1_13/api/batch/v2alpha1/cron_job.rs +++ b/src/v1_13/api/batch/v2alpha1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_13::api::batch::v2alpha1::CronJob, @@ -69,6 +70,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_13::api::batch::v2alpha1::CronJob), @@ -88,6 +91,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_13::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_13::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_13::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_13::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_13::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_13::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_13::api::batch::v2alpha1::CronJob), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_13::api::batch::v2alpha1::CronJob), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/batch/v2alpha1/mod.rs b/src/v1_13/api/batch/v2alpha1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_13/api/batch/v2alpha1/mod.rs +++ b/src/v1_13/api/batch/v2alpha1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_13/api/certificates/v1beta1/certificate_signing_request.rs b/src/v1_13/api/certificates/v1beta1/certificate_signing_request.rs index 085b20edbf..6641a4c1e5 100644 --- a/src/v1_13/api/certificates/v1beta1/certificate_signing_request.rs +++ b/src/v1_13/api/certificates/v1beta1/certificate_signing_request.rs @@ -28,6 +28,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_certificate_signing_request( body: &crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest, optional: CreateCertificateSigningRequestOptional<'_>, @@ -61,6 +62,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCertificateSigningRequestOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCertificateSigningRequestResponse { Ok(crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest), @@ -80,6 +83,7 @@ pub enum CreateCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_certificate_signing_request( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCertificateSigningRequestResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl CertificateSigningRequest { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_certificate_signing_request( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -254,6 +262,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_collection_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCertificateSigningRequestResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_certificate_signing_request( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::list_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCertificateSigningRequestResponse { Ok(crate::v1_13::api::certificates::v1beta1::CertificateSigningRequestList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestResponse { Ok(crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request_status( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestStatusResponse { Ok(crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request( name: &str, optional: ReadCertificateSigningRequestOptional<'_>, @@ -580,6 +600,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -591,12 +612,14 @@ pub struct ReadCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestResponse { Ok(crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request_status( name: &str, optional: ReadCertificateSigningRequestStatusOptional<'_>, @@ -668,6 +692,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestStatusResponse { Ok(crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request( name: &str, body: &crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest, @@ -760,6 +788,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -769,6 +798,7 @@ pub struct ReplaceCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestResponse { Ok(crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest), @@ -776,6 +806,7 @@ pub enum ReplaceCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -831,6 +862,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_approval( name: &str, body: &crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest, @@ -863,6 +895,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -872,6 +905,7 @@ pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestApprovalResponse { Ok(crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest), @@ -879,6 +913,7 @@ pub enum ReplaceCertificateSigningRequestApprovalResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestApprovalResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -934,6 +969,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_status( name: &str, body: &crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest, @@ -966,6 +1002,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -975,6 +1012,7 @@ pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestStatusResponse { Ok(crate::v1_13::api::certificates::v1beta1::CertificateSigningRequest), @@ -982,6 +1020,7 @@ pub enum ReplaceCertificateSigningRequestStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1033,6 +1072,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_certificate_signing_request( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1051,12 +1091,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::watch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCertificateSigningRequestResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/certificates/v1beta1/mod.rs b/src/v1_13/api/certificates/v1beta1/mod.rs index 48cb9add17..bb9e9e4c0a 100644 --- a/src/v1_13/api/certificates/v1beta1/mod.rs +++ b/src/v1_13/api/certificates/v1beta1/mod.rs @@ -1,37 +1,27 @@ mod certificate_signing_request; -pub use self::certificate_signing_request::{ - CertificateSigningRequest, - CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse, - DeleteCertificateSigningRequestResponse, - DeleteCollectionCertificateSigningRequestResponse, - ListCertificateSigningRequestResponse, - PatchCertificateSigningRequestResponse, - PatchCertificateSigningRequestStatusResponse, - ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse, - ReadCertificateSigningRequestStatusOptional, ReadCertificateSigningRequestStatusResponse, - ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse, - ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse, - ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse, - WatchCertificateSigningRequestResponse, -}; +pub use self::certificate_signing_request::CertificateSigningRequest; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCollectionCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::ListCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestStatusResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestStatusOptional, ReadCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::WatchCertificateSigningRequestResponse; mod certificate_signing_request_condition; -pub use self::certificate_signing_request_condition::{ - CertificateSigningRequestCondition, -}; +pub use self::certificate_signing_request_condition::CertificateSigningRequestCondition; mod certificate_signing_request_list; -pub use self::certificate_signing_request_list::{ - CertificateSigningRequestList, -}; +pub use self::certificate_signing_request_list::CertificateSigningRequestList; mod certificate_signing_request_spec; -pub use self::certificate_signing_request_spec::{ - CertificateSigningRequestSpec, -}; +pub use self::certificate_signing_request_spec::CertificateSigningRequestSpec; mod certificate_signing_request_status; -pub use self::certificate_signing_request_status::{ - CertificateSigningRequestStatus, -}; +pub use self::certificate_signing_request_status::CertificateSigningRequestStatus; diff --git a/src/v1_13/api/coordination/v1beta1/lease.rs b/src/v1_13/api/coordination/v1beta1/lease.rs index e5a4dd0ee6..63ca3ef617 100644 --- a/src/v1_13/api/coordination/v1beta1/lease.rs +++ b/src/v1_13/api/coordination/v1beta1/lease.rs @@ -30,6 +30,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_lease( namespace: &str, body: &crate::v1_13::api::coordination::v1beta1::Lease, @@ -66,6 +67,7 @@ impl Lease { } /// Optional parameters of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLeaseResponse { Ok(crate::v1_13::api::coordination::v1beta1::Lease), @@ -85,6 +88,7 @@ pub enum CreateNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Lease { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_lease( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_collection_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLeaseResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_lease( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLeaseResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_lease_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLeaseForAllNamespacesResponse { Ok(crate::v1_13::api::coordination::v1beta1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_lease( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -427,12 +441,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLeaseResponse { Ok(crate::v1_13::api::coordination::v1beta1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_lease( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::patch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLeaseResponse { Ok(crate::v1_13::api::coordination::v1beta1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_lease( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl Lease { } /// Optional parameters of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLeaseOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -615,12 +636,14 @@ pub struct ReadNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLeaseResponse { Ok(crate::v1_13::api::coordination::v1beta1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_lease( name: &str, namespace: &str, @@ -706,6 +730,7 @@ impl Lease { } /// Optional parameters of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -715,6 +740,7 @@ pub struct ReplaceNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLeaseResponse { Ok(crate::v1_13::api::coordination::v1beta1::Lease), @@ -722,6 +748,7 @@ pub enum ReplaceNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -773,6 +800,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_lease_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -791,12 +819,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLeaseForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -846,6 +876,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_lease( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -867,12 +898,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLeaseResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/coordination/v1beta1/mod.rs b/src/v1_13/api/coordination/v1beta1/mod.rs index 5c3207ad2d..ff1ce80627 100644 --- a/src/v1_13/api/coordination/v1beta1/mod.rs +++ b/src/v1_13/api/coordination/v1beta1/mod.rs @@ -1,25 +1,19 @@ mod lease; -pub use self::lease::{ - Lease, - CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse, - DeleteCollectionNamespacedLeaseResponse, - DeleteNamespacedLeaseResponse, - ListLeaseForAllNamespacesResponse, - ListNamespacedLeaseResponse, - PatchNamespacedLeaseResponse, - ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse, - ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse, - WatchLeaseForAllNamespacesResponse, - WatchNamespacedLeaseResponse, -}; +pub use self::lease::Lease; +#[cfg(feature = "api")] pub use self::lease::{CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::DeleteCollectionNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::DeleteNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::ListLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::ListNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::PatchNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::{ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::{ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::WatchLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::WatchNamespacedLeaseResponse; mod lease_list; -pub use self::lease_list::{ - LeaseList, -}; +pub use self::lease_list::LeaseList; mod lease_spec; -pub use self::lease_spec::{ - LeaseSpec, -}; +pub use self::lease_spec::LeaseSpec; diff --git a/src/v1_13/api/core/v1/binding.rs b/src/v1_13/api/core/v1/binding.rs index f09e50a29e..962815001f 100644 --- a/src/v1_13/api/core/v1/binding.rs +++ b/src/v1_13/api/core/v1/binding.rs @@ -30,6 +30,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_binding( namespace: &str, body: &crate::v1_13::api::core::v1::Binding, @@ -66,6 +67,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedBindingResponse { Ok(crate::v1_13::api::core::v1::Binding), @@ -85,6 +88,7 @@ pub enum CreateNamespacedBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -152,6 +156,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_binding( name: &str, namespace: &str, @@ -190,6 +195,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -201,6 +207,7 @@ pub struct CreateNamespacedPodBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodBindingResponse { Ok(crate::v1_13::api::core::v1::Binding), @@ -209,6 +216,7 @@ pub enum CreateNamespacedPodBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/component_status.rs b/src/v1_13/api/core/v1/component_status.rs index 8b769f9f81..1b51a80b95 100644 --- a/src/v1_13/api/core/v1/component_status.rs +++ b/src/v1_13/api/core/v1/component_status.rs @@ -26,6 +26,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_component_status( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -44,12 +45,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::list_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListComponentStatusResponse { Ok(crate::v1_13::api::core::v1::ComponentStatusList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -95,6 +98,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_component_status( name: &str, optional: ReadComponentStatusOptional<'_>, @@ -121,6 +125,7 @@ impl ComponentStatus { } /// Optional parameters of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadComponentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -128,12 +133,14 @@ pub struct ReadComponentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadComponentStatusResponse { Ok(crate::v1_13::api::core::v1::ComponentStatus), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -177,6 +184,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_component_status( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -195,12 +203,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::watch_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchComponentStatusResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/config_map.rs b/src/v1_13/api/core/v1/config_map.rs index 4cc5987428..b919eb5e5d 100644 --- a/src/v1_13/api/core/v1/config_map.rs +++ b/src/v1_13/api/core/v1/config_map.rs @@ -33,6 +33,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_config_map( namespace: &str, body: &crate::v1_13::api::core::v1::ConfigMap, @@ -69,6 +70,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedConfigMapOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedConfigMapResponse { Ok(crate::v1_13::api::core::v1::ConfigMap), @@ -88,6 +91,7 @@ pub enum CreateNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ConfigMap { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_config_map( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_collection_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedConfigMapResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_config_map( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedConfigMapResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_config_map_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListConfigMapForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_config_map( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedConfigMapResponse { Ok(crate::v1_13::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_config_map( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::patch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedConfigMapResponse { Ok(crate::v1_13::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_config_map( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedConfigMapOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -618,12 +639,14 @@ pub struct ReadNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedConfigMapResponse { Ok(crate::v1_13::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_config_map( name: &str, namespace: &str, @@ -709,6 +733,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedConfigMapOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -718,6 +743,7 @@ pub struct ReplaceNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedConfigMapResponse { Ok(crate::v1_13::api::core::v1::ConfigMap), @@ -725,6 +751,7 @@ pub enum ReplaceNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -776,6 +803,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_config_map_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -794,12 +822,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchConfigMapForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_config_map( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -870,12 +901,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedConfigMapResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/endpoints.rs b/src/v1_13/api/core/v1/endpoints.rs index a9173dfec3..7b8915aa35 100644 --- a/src/v1_13/api/core/v1/endpoints.rs +++ b/src/v1_13/api/core/v1/endpoints.rs @@ -41,6 +41,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_endpoints( namespace: &str, body: &crate::v1_13::api::core::v1::Endpoints, @@ -77,6 +78,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEndpointsOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -88,6 +90,7 @@ pub struct CreateNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEndpointsResponse { Ok(crate::v1_13::api::core::v1::Endpoints), @@ -96,6 +99,7 @@ pub enum CreateNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -161,6 +165,7 @@ impl Endpoints { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_endpoints( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -184,6 +189,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_collection_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEndpointsResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -191,6 +197,7 @@ pub enum DeleteCollectionNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -253,6 +260,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_endpoints( name: &str, namespace: &str, @@ -274,6 +282,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEndpointsResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -282,6 +291,7 @@ pub enum DeleteNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -346,6 +356,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_endpoints_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -364,12 +375,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEndpointsForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -417,6 +430,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_endpoints( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -438,12 +452,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEndpointsResponse { Ok(crate::v1_13::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -495,6 +511,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_endpoints( name: &str, namespace: &str, @@ -524,12 +541,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::patch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEndpointsResponse { Ok(crate::v1_13::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -579,6 +598,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_endpoints( name: &str, namespace: &str, @@ -615,6 +635,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEndpointsOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -626,12 +647,14 @@ pub struct ReadNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEndpointsResponse { Ok(crate::v1_13::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -683,6 +706,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_endpoints( name: &str, namespace: &str, @@ -717,6 +741,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEndpointsOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -726,6 +751,7 @@ pub struct ReplaceNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEndpointsResponse { Ok(crate::v1_13::api::core::v1::Endpoints), @@ -733,6 +759,7 @@ pub enum ReplaceNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -784,6 +811,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_endpoints_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -802,12 +830,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEndpointsForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -857,6 +887,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_endpoints( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -878,12 +909,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEndpointsResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/event.rs b/src/v1_13/api/core/v1/event.rs index f74305ff40..99d0a6ce4e 100644 --- a/src/v1_13/api/core/v1/event.rs +++ b/src/v1_13/api/core/v1/event.rs @@ -69,6 +69,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_13::api::core::v1::Event, @@ -105,6 +106,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -116,6 +118,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_13::api::core::v1::Event), @@ -124,6 +127,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -189,6 +193,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -212,6 +217,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -219,6 +225,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -281,6 +288,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -302,6 +310,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -310,6 +319,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -374,6 +384,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -392,12 +403,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +458,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -466,12 +480,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_13::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -523,6 +539,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -552,12 +569,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_13::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -607,6 +626,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -643,6 +663,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -654,12 +675,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_13::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -711,6 +734,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -745,6 +769,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -754,6 +779,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_13::api::core::v1::Event), @@ -761,6 +787,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +839,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -830,12 +858,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -885,6 +915,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -906,12 +937,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/limit_range.rs b/src/v1_13/api/core/v1/limit_range.rs index dd18a67102..61a5d664e6 100644 --- a/src/v1_13/api/core/v1/limit_range.rs +++ b/src/v1_13/api/core/v1/limit_range.rs @@ -30,6 +30,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_limit_range( namespace: &str, body: &crate::v1_13::api::core::v1::LimitRange, @@ -66,6 +67,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLimitRangeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLimitRangeResponse { Ok(crate::v1_13::api::core::v1::LimitRange), @@ -85,6 +88,7 @@ pub enum CreateNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl LimitRange { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_limit_range( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_collection_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLimitRangeResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_limit_range( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLimitRangeResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_limit_range_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLimitRangeForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_limit_range( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -427,12 +441,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLimitRangeResponse { Ok(crate::v1_13::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_limit_range( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::patch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLimitRangeResponse { Ok(crate::v1_13::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_limit_range( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLimitRangeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -615,12 +636,14 @@ pub struct ReadNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLimitRangeResponse { Ok(crate::v1_13::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_limit_range( name: &str, namespace: &str, @@ -706,6 +730,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLimitRangeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -715,6 +740,7 @@ pub struct ReplaceNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLimitRangeResponse { Ok(crate::v1_13::api::core::v1::LimitRange), @@ -722,6 +748,7 @@ pub enum ReplaceNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -773,6 +800,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_limit_range_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -791,12 +819,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLimitRangeForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -846,6 +876,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_limit_range( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -867,12 +898,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLimitRangeResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/mod.rs b/src/v1_13/api/core/v1/mod.rs index 817138d73d..522ad86d29 100644 --- a/src/v1_13/api/core/v1/mod.rs +++ b/src/v1_13/api/core/v1/mod.rs @@ -1,1099 +1,743 @@ mod aws_elastic_block_store_volume_source; -pub use self::aws_elastic_block_store_volume_source::{ - AWSElasticBlockStoreVolumeSource, -}; +pub use self::aws_elastic_block_store_volume_source::AWSElasticBlockStoreVolumeSource; mod affinity; -pub use self::affinity::{ - Affinity, -}; +pub use self::affinity::Affinity; mod attached_volume; -pub use self::attached_volume::{ - AttachedVolume, -}; +pub use self::attached_volume::AttachedVolume; mod azure_disk_volume_source; -pub use self::azure_disk_volume_source::{ - AzureDiskVolumeSource, -}; +pub use self::azure_disk_volume_source::AzureDiskVolumeSource; mod azure_file_persistent_volume_source; -pub use self::azure_file_persistent_volume_source::{ - AzureFilePersistentVolumeSource, -}; +pub use self::azure_file_persistent_volume_source::AzureFilePersistentVolumeSource; mod azure_file_volume_source; -pub use self::azure_file_volume_source::{ - AzureFileVolumeSource, -}; +pub use self::azure_file_volume_source::AzureFileVolumeSource; mod binding; -pub use self::binding::{ - Binding, - CreateNamespacedBindingOptional, CreateNamespacedBindingResponse, - CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse, -}; +pub use self::binding::Binding; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedBindingOptional, CreateNamespacedBindingResponse}; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse}; mod csi_persistent_volume_source; -pub use self::csi_persistent_volume_source::{ - CSIPersistentVolumeSource, -}; +pub use self::csi_persistent_volume_source::CSIPersistentVolumeSource; mod capabilities; -pub use self::capabilities::{ - Capabilities, -}; +pub use self::capabilities::Capabilities; mod ceph_fs_persistent_volume_source; -pub use self::ceph_fs_persistent_volume_source::{ - CephFSPersistentVolumeSource, -}; +pub use self::ceph_fs_persistent_volume_source::CephFSPersistentVolumeSource; mod ceph_fs_volume_source; -pub use self::ceph_fs_volume_source::{ - CephFSVolumeSource, -}; +pub use self::ceph_fs_volume_source::CephFSVolumeSource; mod cinder_persistent_volume_source; -pub use self::cinder_persistent_volume_source::{ - CinderPersistentVolumeSource, -}; +pub use self::cinder_persistent_volume_source::CinderPersistentVolumeSource; mod cinder_volume_source; -pub use self::cinder_volume_source::{ - CinderVolumeSource, -}; +pub use self::cinder_volume_source::CinderVolumeSource; mod client_ip_config; -pub use self::client_ip_config::{ - ClientIPConfig, -}; +pub use self::client_ip_config::ClientIPConfig; mod component_condition; -pub use self::component_condition::{ - ComponentCondition, -}; +pub use self::component_condition::ComponentCondition; mod component_status; -pub use self::component_status::{ - ComponentStatus, - ListComponentStatusResponse, - ReadComponentStatusOptional, ReadComponentStatusResponse, - WatchComponentStatusResponse, -}; +pub use self::component_status::ComponentStatus; +#[cfg(feature = "api")] pub use self::component_status::ListComponentStatusResponse; +#[cfg(feature = "api")] pub use self::component_status::{ReadComponentStatusOptional, ReadComponentStatusResponse}; +#[cfg(feature = "api")] pub use self::component_status::WatchComponentStatusResponse; mod component_status_list; -pub use self::component_status_list::{ - ComponentStatusList, -}; +pub use self::component_status_list::ComponentStatusList; mod config_map; -pub use self::config_map::{ - ConfigMap, - CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse, - DeleteCollectionNamespacedConfigMapResponse, - DeleteNamespacedConfigMapResponse, - ListConfigMapForAllNamespacesResponse, - ListNamespacedConfigMapResponse, - PatchNamespacedConfigMapResponse, - ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse, - ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse, - WatchConfigMapForAllNamespacesResponse, - WatchNamespacedConfigMapResponse, -}; +pub use self::config_map::ConfigMap; +#[cfg(feature = "api")] pub use self::config_map::{CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::DeleteCollectionNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::DeleteNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::ListConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::ListNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::PatchNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::{ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::{ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::WatchConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::WatchNamespacedConfigMapResponse; mod config_map_env_source; -pub use self::config_map_env_source::{ - ConfigMapEnvSource, -}; +pub use self::config_map_env_source::ConfigMapEnvSource; mod config_map_key_selector; -pub use self::config_map_key_selector::{ - ConfigMapKeySelector, -}; +pub use self::config_map_key_selector::ConfigMapKeySelector; mod config_map_list; -pub use self::config_map_list::{ - ConfigMapList, -}; +pub use self::config_map_list::ConfigMapList; mod config_map_node_config_source; -pub use self::config_map_node_config_source::{ - ConfigMapNodeConfigSource, -}; +pub use self::config_map_node_config_source::ConfigMapNodeConfigSource; mod config_map_projection; -pub use self::config_map_projection::{ - ConfigMapProjection, -}; +pub use self::config_map_projection::ConfigMapProjection; mod config_map_volume_source; -pub use self::config_map_volume_source::{ - ConfigMapVolumeSource, -}; +pub use self::config_map_volume_source::ConfigMapVolumeSource; mod container; -pub use self::container::{ - Container, -}; +pub use self::container::Container; mod container_image; -pub use self::container_image::{ - ContainerImage, -}; +pub use self::container_image::ContainerImage; mod container_port; -pub use self::container_port::{ - ContainerPort, -}; +pub use self::container_port::ContainerPort; mod container_state; -pub use self::container_state::{ - ContainerState, -}; +pub use self::container_state::ContainerState; mod container_state_running; -pub use self::container_state_running::{ - ContainerStateRunning, -}; +pub use self::container_state_running::ContainerStateRunning; mod container_state_terminated; -pub use self::container_state_terminated::{ - ContainerStateTerminated, -}; +pub use self::container_state_terminated::ContainerStateTerminated; mod container_state_waiting; -pub use self::container_state_waiting::{ - ContainerStateWaiting, -}; +pub use self::container_state_waiting::ContainerStateWaiting; mod container_status; -pub use self::container_status::{ - ContainerStatus, -}; +pub use self::container_status::ContainerStatus; mod daemon_endpoint; -pub use self::daemon_endpoint::{ - DaemonEndpoint, -}; +pub use self::daemon_endpoint::DaemonEndpoint; mod downward_api_projection; -pub use self::downward_api_projection::{ - DownwardAPIProjection, -}; +pub use self::downward_api_projection::DownwardAPIProjection; mod downward_api_volume_file; -pub use self::downward_api_volume_file::{ - DownwardAPIVolumeFile, -}; +pub use self::downward_api_volume_file::DownwardAPIVolumeFile; mod downward_api_volume_source; -pub use self::downward_api_volume_source::{ - DownwardAPIVolumeSource, -}; +pub use self::downward_api_volume_source::DownwardAPIVolumeSource; mod empty_dir_volume_source; -pub use self::empty_dir_volume_source::{ - EmptyDirVolumeSource, -}; +pub use self::empty_dir_volume_source::EmptyDirVolumeSource; mod endpoint_address; -pub use self::endpoint_address::{ - EndpointAddress, -}; +pub use self::endpoint_address::EndpointAddress; mod endpoint_port; -pub use self::endpoint_port::{ - EndpointPort, -}; +pub use self::endpoint_port::EndpointPort; mod endpoint_subset; -pub use self::endpoint_subset::{ - EndpointSubset, -}; +pub use self::endpoint_subset::EndpointSubset; mod endpoints; -pub use self::endpoints::{ - Endpoints, - CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse, - DeleteCollectionNamespacedEndpointsResponse, - DeleteNamespacedEndpointsResponse, - ListEndpointsForAllNamespacesResponse, - ListNamespacedEndpointsResponse, - PatchNamespacedEndpointsResponse, - ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse, - ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse, - WatchEndpointsForAllNamespacesResponse, - WatchNamespacedEndpointsResponse, -}; +pub use self::endpoints::Endpoints; +#[cfg(feature = "api")] pub use self::endpoints::{CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::DeleteCollectionNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::DeleteNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::PatchNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::{ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::{ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::WatchEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::WatchNamespacedEndpointsResponse; mod endpoints_list; -pub use self::endpoints_list::{ - EndpointsList, -}; +pub use self::endpoints_list::EndpointsList; mod env_from_source; -pub use self::env_from_source::{ - EnvFromSource, -}; +pub use self::env_from_source::EnvFromSource; mod env_var; -pub use self::env_var::{ - EnvVar, -}; +pub use self::env_var::EnvVar; mod env_var_source; -pub use self::env_var_source::{ - EnvVarSource, -}; +pub use self::env_var_source::EnvVarSource; mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; mod event_source; -pub use self::event_source::{ - EventSource, -}; +pub use self::event_source::EventSource; mod exec_action; -pub use self::exec_action::{ - ExecAction, -}; +pub use self::exec_action::ExecAction; mod fc_volume_source; -pub use self::fc_volume_source::{ - FCVolumeSource, -}; +pub use self::fc_volume_source::FCVolumeSource; mod flex_persistent_volume_source; -pub use self::flex_persistent_volume_source::{ - FlexPersistentVolumeSource, -}; +pub use self::flex_persistent_volume_source::FlexPersistentVolumeSource; mod flex_volume_source; -pub use self::flex_volume_source::{ - FlexVolumeSource, -}; +pub use self::flex_volume_source::FlexVolumeSource; mod flocker_volume_source; -pub use self::flocker_volume_source::{ - FlockerVolumeSource, -}; +pub use self::flocker_volume_source::FlockerVolumeSource; mod gce_persistent_disk_volume_source; -pub use self::gce_persistent_disk_volume_source::{ - GCEPersistentDiskVolumeSource, -}; +pub use self::gce_persistent_disk_volume_source::GCEPersistentDiskVolumeSource; mod git_repo_volume_source; -pub use self::git_repo_volume_source::{ - GitRepoVolumeSource, -}; +pub use self::git_repo_volume_source::GitRepoVolumeSource; mod glusterfs_persistent_volume_source; -pub use self::glusterfs_persistent_volume_source::{ - GlusterfsPersistentVolumeSource, -}; +pub use self::glusterfs_persistent_volume_source::GlusterfsPersistentVolumeSource; mod glusterfs_volume_source; -pub use self::glusterfs_volume_source::{ - GlusterfsVolumeSource, -}; +pub use self::glusterfs_volume_source::GlusterfsVolumeSource; mod http_get_action; -pub use self::http_get_action::{ - HTTPGetAction, -}; +pub use self::http_get_action::HTTPGetAction; mod http_header; -pub use self::http_header::{ - HTTPHeader, -}; +pub use self::http_header::HTTPHeader; mod handler; -pub use self::handler::{ - Handler, -}; +pub use self::handler::Handler; mod host_alias; -pub use self::host_alias::{ - HostAlias, -}; +pub use self::host_alias::HostAlias; mod host_path_volume_source; -pub use self::host_path_volume_source::{ - HostPathVolumeSource, -}; +pub use self::host_path_volume_source::HostPathVolumeSource; mod iscsi_persistent_volume_source; -pub use self::iscsi_persistent_volume_source::{ - ISCSIPersistentVolumeSource, -}; +pub use self::iscsi_persistent_volume_source::ISCSIPersistentVolumeSource; mod iscsi_volume_source; -pub use self::iscsi_volume_source::{ - ISCSIVolumeSource, -}; +pub use self::iscsi_volume_source::ISCSIVolumeSource; mod key_to_path; -pub use self::key_to_path::{ - KeyToPath, -}; +pub use self::key_to_path::KeyToPath; mod lifecycle; -pub use self::lifecycle::{ - Lifecycle, -}; +pub use self::lifecycle::Lifecycle; mod limit_range; -pub use self::limit_range::{ - LimitRange, - CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse, - DeleteCollectionNamespacedLimitRangeResponse, - DeleteNamespacedLimitRangeResponse, - ListLimitRangeForAllNamespacesResponse, - ListNamespacedLimitRangeResponse, - PatchNamespacedLimitRangeResponse, - ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse, - ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse, - WatchLimitRangeForAllNamespacesResponse, - WatchNamespacedLimitRangeResponse, -}; +pub use self::limit_range::LimitRange; +#[cfg(feature = "api")] pub use self::limit_range::{CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::DeleteCollectionNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::DeleteNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::PatchNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::{ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::{ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::WatchLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::WatchNamespacedLimitRangeResponse; mod limit_range_item; -pub use self::limit_range_item::{ - LimitRangeItem, -}; +pub use self::limit_range_item::LimitRangeItem; mod limit_range_list; -pub use self::limit_range_list::{ - LimitRangeList, -}; +pub use self::limit_range_list::LimitRangeList; mod limit_range_spec; -pub use self::limit_range_spec::{ - LimitRangeSpec, -}; +pub use self::limit_range_spec::LimitRangeSpec; mod load_balancer_ingress; -pub use self::load_balancer_ingress::{ - LoadBalancerIngress, -}; +pub use self::load_balancer_ingress::LoadBalancerIngress; mod load_balancer_status; -pub use self::load_balancer_status::{ - LoadBalancerStatus, -}; +pub use self::load_balancer_status::LoadBalancerStatus; mod local_object_reference; -pub use self::local_object_reference::{ - LocalObjectReference, -}; +pub use self::local_object_reference::LocalObjectReference; mod local_volume_source; -pub use self::local_volume_source::{ - LocalVolumeSource, -}; +pub use self::local_volume_source::LocalVolumeSource; mod nfs_volume_source; -pub use self::nfs_volume_source::{ - NFSVolumeSource, -}; +pub use self::nfs_volume_source::NFSVolumeSource; mod namespace; -pub use self::namespace::{ - Namespace, - CreateNamespaceOptional, CreateNamespaceResponse, - DeleteNamespaceResponse, - ListNamespaceResponse, - PatchNamespaceResponse, - PatchNamespaceStatusResponse, - ReadNamespaceOptional, ReadNamespaceResponse, - ReadNamespaceStatusOptional, ReadNamespaceStatusResponse, - ReplaceNamespaceOptional, ReplaceNamespaceResponse, - ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse, - ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse, - WatchNamespaceResponse, -}; +pub use self::namespace::Namespace; +#[cfg(feature = "api")] pub use self::namespace::{CreateNamespaceOptional, CreateNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::DeleteNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::ListNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceStatusResponse; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceOptional, ReadNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceStatusOptional, ReadNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceOptional, ReplaceNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::WatchNamespaceResponse; mod namespace_list; -pub use self::namespace_list::{ - NamespaceList, -}; +pub use self::namespace_list::NamespaceList; mod namespace_spec; -pub use self::namespace_spec::{ - NamespaceSpec, -}; +pub use self::namespace_spec::NamespaceSpec; mod namespace_status; -pub use self::namespace_status::{ - NamespaceStatus, -}; +pub use self::namespace_status::NamespaceStatus; mod node; -pub use self::node::{ - Node, - ConnectDeleteNodeProxyOptional, - ConnectDeleteNodeProxyWithPathOptional, - ConnectGetNodeProxyOptional, - ConnectGetNodeProxyWithPathOptional, - ConnectPatchNodeProxyOptional, - ConnectPatchNodeProxyWithPathOptional, - ConnectPostNodeProxyOptional, - ConnectPostNodeProxyWithPathOptional, - ConnectPutNodeProxyOptional, - ConnectPutNodeProxyWithPathOptional, - CreateNodeOptional, CreateNodeResponse, - DeleteCollectionNodeResponse, - DeleteNodeResponse, - ListNodeResponse, - PatchNodeResponse, - PatchNodeStatusResponse, - ReadNodeOptional, ReadNodeResponse, - ReadNodeStatusOptional, ReadNodeStatusResponse, - ReplaceNodeOptional, ReplaceNodeResponse, - ReplaceNodeStatusOptional, ReplaceNodeStatusResponse, - WatchNodeResponse, -}; +pub use self::node::Node; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::{CreateNodeOptional, CreateNodeResponse}; +#[cfg(feature = "api")] pub use self::node::DeleteCollectionNodeResponse; +#[cfg(feature = "api")] pub use self::node::DeleteNodeResponse; +#[cfg(feature = "api")] pub use self::node::ListNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeStatusResponse; +#[cfg(feature = "api")] pub use self::node::{ReadNodeOptional, ReadNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReadNodeStatusOptional, ReadNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeOptional, ReplaceNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeStatusOptional, ReplaceNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::WatchNodeResponse; mod node_address; -pub use self::node_address::{ - NodeAddress, -}; +pub use self::node_address::NodeAddress; mod node_affinity; -pub use self::node_affinity::{ - NodeAffinity, -}; +pub use self::node_affinity::NodeAffinity; mod node_condition; -pub use self::node_condition::{ - NodeCondition, -}; +pub use self::node_condition::NodeCondition; mod node_config_source; -pub use self::node_config_source::{ - NodeConfigSource, -}; +pub use self::node_config_source::NodeConfigSource; mod node_config_status; -pub use self::node_config_status::{ - NodeConfigStatus, -}; +pub use self::node_config_status::NodeConfigStatus; mod node_daemon_endpoints; -pub use self::node_daemon_endpoints::{ - NodeDaemonEndpoints, -}; +pub use self::node_daemon_endpoints::NodeDaemonEndpoints; mod node_list; -pub use self::node_list::{ - NodeList, -}; +pub use self::node_list::NodeList; mod node_selector; -pub use self::node_selector::{ - NodeSelector, -}; +pub use self::node_selector::NodeSelector; mod node_selector_requirement; -pub use self::node_selector_requirement::{ - NodeSelectorRequirement, -}; +pub use self::node_selector_requirement::NodeSelectorRequirement; mod node_selector_term; -pub use self::node_selector_term::{ - NodeSelectorTerm, -}; +pub use self::node_selector_term::NodeSelectorTerm; mod node_spec; -pub use self::node_spec::{ - NodeSpec, -}; +pub use self::node_spec::NodeSpec; mod node_status; -pub use self::node_status::{ - NodeStatus, -}; +pub use self::node_status::NodeStatus; mod node_system_info; -pub use self::node_system_info::{ - NodeSystemInfo, -}; +pub use self::node_system_info::NodeSystemInfo; mod object_field_selector; -pub use self::object_field_selector::{ - ObjectFieldSelector, -}; +pub use self::object_field_selector::ObjectFieldSelector; mod object_reference; -pub use self::object_reference::{ - ObjectReference, -}; +pub use self::object_reference::ObjectReference; mod persistent_volume; -pub use self::persistent_volume::{ - PersistentVolume, - CreatePersistentVolumeOptional, CreatePersistentVolumeResponse, - DeleteCollectionPersistentVolumeResponse, - DeletePersistentVolumeResponse, - ListPersistentVolumeResponse, - PatchPersistentVolumeResponse, - PatchPersistentVolumeStatusResponse, - ReadPersistentVolumeOptional, ReadPersistentVolumeResponse, - ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse, - ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse, - ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse, - WatchPersistentVolumeResponse, -}; +pub use self::persistent_volume::PersistentVolume; +#[cfg(feature = "api")] pub use self::persistent_volume::{CreatePersistentVolumeOptional, CreatePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::DeleteCollectionPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::DeletePersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::ListPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeOptional, ReadPersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::WatchPersistentVolumeResponse; mod persistent_volume_claim; -pub use self::persistent_volume_claim::{ - PersistentVolumeClaim, - CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse, - DeleteCollectionNamespacedPersistentVolumeClaimResponse, - DeleteNamespacedPersistentVolumeClaimResponse, - ListNamespacedPersistentVolumeClaimResponse, - ListPersistentVolumeClaimForAllNamespacesResponse, - PatchNamespacedPersistentVolumeClaimResponse, - PatchNamespacedPersistentVolumeClaimStatusResponse, - ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse, - ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse, - ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse, - ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse, - WatchNamespacedPersistentVolumeClaimResponse, - WatchPersistentVolumeClaimForAllNamespacesResponse, -}; +pub use self::persistent_volume_claim::PersistentVolumeClaim; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteCollectionNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListPersistentVolumeClaimForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchPersistentVolumeClaimForAllNamespacesResponse; mod persistent_volume_claim_condition; -pub use self::persistent_volume_claim_condition::{ - PersistentVolumeClaimCondition, -}; +pub use self::persistent_volume_claim_condition::PersistentVolumeClaimCondition; mod persistent_volume_claim_list; -pub use self::persistent_volume_claim_list::{ - PersistentVolumeClaimList, -}; +pub use self::persistent_volume_claim_list::PersistentVolumeClaimList; mod persistent_volume_claim_spec; -pub use self::persistent_volume_claim_spec::{ - PersistentVolumeClaimSpec, -}; +pub use self::persistent_volume_claim_spec::PersistentVolumeClaimSpec; mod persistent_volume_claim_status; -pub use self::persistent_volume_claim_status::{ - PersistentVolumeClaimStatus, -}; +pub use self::persistent_volume_claim_status::PersistentVolumeClaimStatus; mod persistent_volume_claim_volume_source; -pub use self::persistent_volume_claim_volume_source::{ - PersistentVolumeClaimVolumeSource, -}; +pub use self::persistent_volume_claim_volume_source::PersistentVolumeClaimVolumeSource; mod persistent_volume_list; -pub use self::persistent_volume_list::{ - PersistentVolumeList, -}; +pub use self::persistent_volume_list::PersistentVolumeList; mod persistent_volume_spec; -pub use self::persistent_volume_spec::{ - PersistentVolumeSpec, -}; +pub use self::persistent_volume_spec::PersistentVolumeSpec; mod persistent_volume_status; -pub use self::persistent_volume_status::{ - PersistentVolumeStatus, -}; +pub use self::persistent_volume_status::PersistentVolumeStatus; mod photon_persistent_disk_volume_source; -pub use self::photon_persistent_disk_volume_source::{ - PhotonPersistentDiskVolumeSource, -}; +pub use self::photon_persistent_disk_volume_source::PhotonPersistentDiskVolumeSource; mod pod; -pub use self::pod::{ - Pod, - ConnectDeleteNamespacedPodProxyOptional, - ConnectDeleteNamespacedPodProxyWithPathOptional, - ConnectGetNamespacedPodAttachOptional, - ConnectGetNamespacedPodExecOptional, - ConnectGetNamespacedPodPortforwardOptional, - ConnectGetNamespacedPodProxyOptional, - ConnectGetNamespacedPodProxyWithPathOptional, - ConnectPatchNamespacedPodProxyOptional, - ConnectPatchNamespacedPodProxyWithPathOptional, - ConnectPostNamespacedPodAttachOptional, - ConnectPostNamespacedPodExecOptional, - ConnectPostNamespacedPodPortforwardOptional, - ConnectPostNamespacedPodProxyOptional, - ConnectPostNamespacedPodProxyWithPathOptional, - ConnectPutNamespacedPodProxyOptional, - ConnectPutNamespacedPodProxyWithPathOptional, - CreateNamespacedPodOptional, CreateNamespacedPodResponse, - DeleteCollectionNamespacedPodResponse, - DeleteNamespacedPodResponse, - ListNamespacedPodResponse, - ListPodForAllNamespacesResponse, - PatchNamespacedPodResponse, - PatchNamespacedPodStatusResponse, - ReadNamespacedPodOptional, ReadNamespacedPodResponse, - ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse, - ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse, - ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse, - ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse, - WatchNamespacedPodResponse, - WatchPodForAllNamespacesResponse, -}; +pub use self::pod::Pod; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::{CreateNamespacedPodOptional, CreateNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::DeleteCollectionNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::DeleteNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListPodForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodStatusResponse; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodOptional, ReadNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::WatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::WatchPodForAllNamespacesResponse; mod pod_affinity; -pub use self::pod_affinity::{ - PodAffinity, -}; +pub use self::pod_affinity::PodAffinity; mod pod_affinity_term; -pub use self::pod_affinity_term::{ - PodAffinityTerm, -}; +pub use self::pod_affinity_term::PodAffinityTerm; mod pod_anti_affinity; -pub use self::pod_anti_affinity::{ - PodAntiAffinity, -}; +pub use self::pod_anti_affinity::PodAntiAffinity; mod pod_condition; -pub use self::pod_condition::{ - PodCondition, -}; +pub use self::pod_condition::PodCondition; mod pod_dns_config; -pub use self::pod_dns_config::{ - PodDNSConfig, -}; +pub use self::pod_dns_config::PodDNSConfig; mod pod_dns_config_option; -pub use self::pod_dns_config_option::{ - PodDNSConfigOption, -}; +pub use self::pod_dns_config_option::PodDNSConfigOption; mod pod_list; -pub use self::pod_list::{ - PodList, -}; +pub use self::pod_list::PodList; mod pod_readiness_gate; -pub use self::pod_readiness_gate::{ - PodReadinessGate, -}; +pub use self::pod_readiness_gate::PodReadinessGate; mod pod_security_context; -pub use self::pod_security_context::{ - PodSecurityContext, -}; +pub use self::pod_security_context::PodSecurityContext; mod pod_spec; -pub use self::pod_spec::{ - PodSpec, -}; +pub use self::pod_spec::PodSpec; mod pod_status; -pub use self::pod_status::{ - PodStatus, -}; +pub use self::pod_status::PodStatus; mod pod_template; -pub use self::pod_template::{ - PodTemplate, - CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse, - DeleteCollectionNamespacedPodTemplateResponse, - DeleteNamespacedPodTemplateResponse, - ListNamespacedPodTemplateResponse, - ListPodTemplateForAllNamespacesResponse, - PatchNamespacedPodTemplateResponse, - ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse, - ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse, - WatchNamespacedPodTemplateResponse, - WatchPodTemplateForAllNamespacesResponse, -}; +pub use self::pod_template::PodTemplate; +#[cfg(feature = "api")] pub use self::pod_template::{CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::DeleteCollectionNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::DeleteNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListPodTemplateForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_template::PatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::{ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::{ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::WatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::WatchPodTemplateForAllNamespacesResponse; mod pod_template_list; -pub use self::pod_template_list::{ - PodTemplateList, -}; +pub use self::pod_template_list::PodTemplateList; mod pod_template_spec; -pub use self::pod_template_spec::{ - PodTemplateSpec, -}; +pub use self::pod_template_spec::PodTemplateSpec; mod portworx_volume_source; -pub use self::portworx_volume_source::{ - PortworxVolumeSource, -}; +pub use self::portworx_volume_source::PortworxVolumeSource; mod preferred_scheduling_term; -pub use self::preferred_scheduling_term::{ - PreferredSchedulingTerm, -}; +pub use self::preferred_scheduling_term::PreferredSchedulingTerm; mod probe; -pub use self::probe::{ - Probe, -}; +pub use self::probe::Probe; mod projected_volume_source; -pub use self::projected_volume_source::{ - ProjectedVolumeSource, -}; +pub use self::projected_volume_source::ProjectedVolumeSource; mod quobyte_volume_source; -pub use self::quobyte_volume_source::{ - QuobyteVolumeSource, -}; +pub use self::quobyte_volume_source::QuobyteVolumeSource; mod rbd_persistent_volume_source; -pub use self::rbd_persistent_volume_source::{ - RBDPersistentVolumeSource, -}; +pub use self::rbd_persistent_volume_source::RBDPersistentVolumeSource; mod rbd_volume_source; -pub use self::rbd_volume_source::{ - RBDVolumeSource, -}; +pub use self::rbd_volume_source::RBDVolumeSource; mod replication_controller; -pub use self::replication_controller::{ - ReplicationController, - CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse, - DeleteCollectionNamespacedReplicationControllerResponse, - DeleteNamespacedReplicationControllerResponse, - ListNamespacedReplicationControllerResponse, - ListReplicationControllerForAllNamespacesResponse, - PatchNamespacedReplicationControllerResponse, - PatchNamespacedReplicationControllerStatusResponse, - ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse, - ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse, - ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse, - ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse, - WatchNamespacedReplicationControllerResponse, - WatchReplicationControllerForAllNamespacesResponse, -}; +pub use self::replication_controller::ReplicationController; +#[cfg(feature = "api")] pub use self::replication_controller::{CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteCollectionNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListReplicationControllerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerStatusResponse; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::WatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::WatchReplicationControllerForAllNamespacesResponse; mod replication_controller_condition; -pub use self::replication_controller_condition::{ - ReplicationControllerCondition, -}; +pub use self::replication_controller_condition::ReplicationControllerCondition; mod replication_controller_list; -pub use self::replication_controller_list::{ - ReplicationControllerList, -}; +pub use self::replication_controller_list::ReplicationControllerList; mod replication_controller_spec; -pub use self::replication_controller_spec::{ - ReplicationControllerSpec, -}; +pub use self::replication_controller_spec::ReplicationControllerSpec; mod replication_controller_status; -pub use self::replication_controller_status::{ - ReplicationControllerStatus, -}; +pub use self::replication_controller_status::ReplicationControllerStatus; mod resource_field_selector; -pub use self::resource_field_selector::{ - ResourceFieldSelector, -}; +pub use self::resource_field_selector::ResourceFieldSelector; mod resource_quota; -pub use self::resource_quota::{ - ResourceQuota, - CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse, - DeleteCollectionNamespacedResourceQuotaResponse, - DeleteNamespacedResourceQuotaResponse, - ListNamespacedResourceQuotaResponse, - ListResourceQuotaForAllNamespacesResponse, - PatchNamespacedResourceQuotaResponse, - PatchNamespacedResourceQuotaStatusResponse, - ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse, - ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse, - ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse, - ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse, - WatchNamespacedResourceQuotaResponse, - WatchResourceQuotaForAllNamespacesResponse, -}; +pub use self::resource_quota::ResourceQuota; +#[cfg(feature = "api")] pub use self::resource_quota::{CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteCollectionNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListResourceQuotaForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaStatusResponse; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::WatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::WatchResourceQuotaForAllNamespacesResponse; mod resource_quota_list; -pub use self::resource_quota_list::{ - ResourceQuotaList, -}; +pub use self::resource_quota_list::ResourceQuotaList; mod resource_quota_spec; -pub use self::resource_quota_spec::{ - ResourceQuotaSpec, -}; +pub use self::resource_quota_spec::ResourceQuotaSpec; mod resource_quota_status; -pub use self::resource_quota_status::{ - ResourceQuotaStatus, -}; +pub use self::resource_quota_status::ResourceQuotaStatus; mod resource_requirements; -pub use self::resource_requirements::{ - ResourceRequirements, -}; +pub use self::resource_requirements::ResourceRequirements; mod se_linux_options; -pub use self::se_linux_options::{ - SELinuxOptions, -}; +pub use self::se_linux_options::SELinuxOptions; mod scale_io_persistent_volume_source; -pub use self::scale_io_persistent_volume_source::{ - ScaleIOPersistentVolumeSource, -}; +pub use self::scale_io_persistent_volume_source::ScaleIOPersistentVolumeSource; mod scale_io_volume_source; -pub use self::scale_io_volume_source::{ - ScaleIOVolumeSource, -}; +pub use self::scale_io_volume_source::ScaleIOVolumeSource; mod scope_selector; -pub use self::scope_selector::{ - ScopeSelector, -}; +pub use self::scope_selector::ScopeSelector; mod scoped_resource_selector_requirement; -pub use self::scoped_resource_selector_requirement::{ - ScopedResourceSelectorRequirement, -}; +pub use self::scoped_resource_selector_requirement::ScopedResourceSelectorRequirement; mod secret; -pub use self::secret::{ - Secret, - CreateNamespacedSecretOptional, CreateNamespacedSecretResponse, - DeleteCollectionNamespacedSecretResponse, - DeleteNamespacedSecretResponse, - ListNamespacedSecretResponse, - ListSecretForAllNamespacesResponse, - PatchNamespacedSecretResponse, - ReadNamespacedSecretOptional, ReadNamespacedSecretResponse, - ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse, - WatchNamespacedSecretResponse, - WatchSecretForAllNamespacesResponse, -}; +pub use self::secret::Secret; +#[cfg(feature = "api")] pub use self::secret::{CreateNamespacedSecretOptional, CreateNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::DeleteCollectionNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::DeleteNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListSecretForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::secret::PatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::{ReadNamespacedSecretOptional, ReadNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::{ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::WatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::WatchSecretForAllNamespacesResponse; mod secret_env_source; -pub use self::secret_env_source::{ - SecretEnvSource, -}; +pub use self::secret_env_source::SecretEnvSource; mod secret_key_selector; -pub use self::secret_key_selector::{ - SecretKeySelector, -}; +pub use self::secret_key_selector::SecretKeySelector; mod secret_list; -pub use self::secret_list::{ - SecretList, -}; +pub use self::secret_list::SecretList; mod secret_projection; -pub use self::secret_projection::{ - SecretProjection, -}; +pub use self::secret_projection::SecretProjection; mod secret_reference; -pub use self::secret_reference::{ - SecretReference, -}; +pub use self::secret_reference::SecretReference; mod secret_volume_source; -pub use self::secret_volume_source::{ - SecretVolumeSource, -}; +pub use self::secret_volume_source::SecretVolumeSource; mod security_context; -pub use self::security_context::{ - SecurityContext, -}; +pub use self::security_context::SecurityContext; mod service; -pub use self::service::{ - Service, - ConnectDeleteNamespacedServiceProxyOptional, - ConnectDeleteNamespacedServiceProxyWithPathOptional, - ConnectGetNamespacedServiceProxyOptional, - ConnectGetNamespacedServiceProxyWithPathOptional, - ConnectPatchNamespacedServiceProxyOptional, - ConnectPatchNamespacedServiceProxyWithPathOptional, - ConnectPostNamespacedServiceProxyOptional, - ConnectPostNamespacedServiceProxyWithPathOptional, - ConnectPutNamespacedServiceProxyOptional, - ConnectPutNamespacedServiceProxyWithPathOptional, - CreateNamespacedServiceOptional, CreateNamespacedServiceResponse, - DeleteNamespacedServiceResponse, - ListNamespacedServiceResponse, - ListServiceForAllNamespacesResponse, - PatchNamespacedServiceResponse, - PatchNamespacedServiceStatusResponse, - ReadNamespacedServiceOptional, ReadNamespacedServiceResponse, - ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse, - ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse, - ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse, - WatchNamespacedServiceResponse, - WatchServiceForAllNamespacesResponse, -}; +pub use self::service::Service; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::{CreateNamespacedServiceOptional, CreateNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::DeleteNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListServiceForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceStatusResponse; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceOptional, ReadNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::WatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::WatchServiceForAllNamespacesResponse; mod service_account; -pub use self::service_account::{ - ServiceAccount, - CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse, - DeleteCollectionNamespacedServiceAccountResponse, - DeleteNamespacedServiceAccountResponse, - ListNamespacedServiceAccountResponse, - ListServiceAccountForAllNamespacesResponse, - PatchNamespacedServiceAccountResponse, - ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse, - ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse, - WatchNamespacedServiceAccountResponse, - WatchServiceAccountForAllNamespacesResponse, -}; +pub use self::service_account::ServiceAccount; +#[cfg(feature = "api")] pub use self::service_account::{CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::DeleteCollectionNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::DeleteNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListServiceAccountForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service_account::PatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::{ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::{ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::WatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::WatchServiceAccountForAllNamespacesResponse; mod service_account_list; -pub use self::service_account_list::{ - ServiceAccountList, -}; +pub use self::service_account_list::ServiceAccountList; mod service_account_token_projection; -pub use self::service_account_token_projection::{ - ServiceAccountTokenProjection, -}; +pub use self::service_account_token_projection::ServiceAccountTokenProjection; mod service_list; -pub use self::service_list::{ - ServiceList, -}; +pub use self::service_list::ServiceList; mod service_port; -pub use self::service_port::{ - ServicePort, -}; +pub use self::service_port::ServicePort; mod service_spec; -pub use self::service_spec::{ - ServiceSpec, -}; +pub use self::service_spec::ServiceSpec; mod service_status; -pub use self::service_status::{ - ServiceStatus, -}; +pub use self::service_status::ServiceStatus; mod session_affinity_config; -pub use self::session_affinity_config::{ - SessionAffinityConfig, -}; +pub use self::session_affinity_config::SessionAffinityConfig; mod storage_os_persistent_volume_source; -pub use self::storage_os_persistent_volume_source::{ - StorageOSPersistentVolumeSource, -}; +pub use self::storage_os_persistent_volume_source::StorageOSPersistentVolumeSource; mod storage_os_volume_source; -pub use self::storage_os_volume_source::{ - StorageOSVolumeSource, -}; +pub use self::storage_os_volume_source::StorageOSVolumeSource; mod sysctl; -pub use self::sysctl::{ - Sysctl, -}; +pub use self::sysctl::Sysctl; mod tcp_socket_action; -pub use self::tcp_socket_action::{ - TCPSocketAction, -}; +pub use self::tcp_socket_action::TCPSocketAction; mod taint; -pub use self::taint::{ - Taint, -}; +pub use self::taint::Taint; mod toleration; -pub use self::toleration::{ - Toleration, -}; +pub use self::toleration::Toleration; mod topology_selector_label_requirement; -pub use self::topology_selector_label_requirement::{ - TopologySelectorLabelRequirement, -}; +pub use self::topology_selector_label_requirement::TopologySelectorLabelRequirement; mod topology_selector_term; -pub use self::topology_selector_term::{ - TopologySelectorTerm, -}; +pub use self::topology_selector_term::TopologySelectorTerm; mod typed_local_object_reference; -pub use self::typed_local_object_reference::{ - TypedLocalObjectReference, -}; +pub use self::typed_local_object_reference::TypedLocalObjectReference; mod volume; -pub use self::volume::{ - Volume, -}; +pub use self::volume::Volume; mod volume_device; -pub use self::volume_device::{ - VolumeDevice, -}; +pub use self::volume_device::VolumeDevice; mod volume_mount; -pub use self::volume_mount::{ - VolumeMount, -}; +pub use self::volume_mount::VolumeMount; mod volume_node_affinity; -pub use self::volume_node_affinity::{ - VolumeNodeAffinity, -}; +pub use self::volume_node_affinity::VolumeNodeAffinity; mod volume_projection; -pub use self::volume_projection::{ - VolumeProjection, -}; +pub use self::volume_projection::VolumeProjection; mod vsphere_virtual_disk_volume_source; -pub use self::vsphere_virtual_disk_volume_source::{ - VsphereVirtualDiskVolumeSource, -}; +pub use self::vsphere_virtual_disk_volume_source::VsphereVirtualDiskVolumeSource; mod weighted_pod_affinity_term; -pub use self::weighted_pod_affinity_term::{ - WeightedPodAffinityTerm, -}; +pub use self::weighted_pod_affinity_term::WeightedPodAffinityTerm; diff --git a/src/v1_13/api/core/v1/namespace.rs b/src/v1_13/api/core/v1/namespace.rs index 2b1381aeec..ec19d705c0 100644 --- a/src/v1_13/api/core/v1/namespace.rs +++ b/src/v1_13/api/core/v1/namespace.rs @@ -29,6 +29,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespace( body: &crate::v1_13::api::core::v1::Namespace, optional: CreateNamespaceOptional<'_>, @@ -62,6 +63,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespaceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespaceResponse { Ok(crate::v1_13::api::core::v1::Namespace), @@ -81,6 +84,7 @@ pub enum CreateNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespace( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::delete_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespaceResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespace( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -251,12 +259,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::list_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespaceResponse { Ok(crate::v1_13::api::core::v1::NamespaceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -304,6 +314,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -331,12 +342,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceResponse { Ok(crate::v1_13::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -384,6 +397,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace_status( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -411,12 +425,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceStatusResponse { Ok(crate::v1_13::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -462,6 +478,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace( name: &str, optional: ReadNamespaceOptional<'_>, @@ -496,6 +513,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -507,12 +525,14 @@ pub struct ReadNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceResponse { Ok(crate::v1_13::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -558,6 +578,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace_status( name: &str, optional: ReadNamespaceStatusOptional<'_>, @@ -584,6 +605,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -591,12 +613,14 @@ pub struct ReadNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceStatusResponse { Ok(crate::v1_13::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -644,6 +668,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace( name: &str, body: &crate::v1_13::api::core::v1::Namespace, @@ -676,6 +701,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -685,6 +711,7 @@ pub struct ReplaceNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceResponse { Ok(crate::v1_13::api::core::v1::Namespace), @@ -692,6 +719,7 @@ pub enum ReplaceNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -747,6 +775,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_finalize( name: &str, body: &crate::v1_13::api::core::v1::Namespace, @@ -779,6 +808,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceFinalizeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -788,6 +818,7 @@ pub struct ReplaceNamespaceFinalizeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceFinalizeResponse { Ok(crate::v1_13::api::core::v1::Namespace), @@ -795,6 +826,7 @@ pub enum ReplaceNamespaceFinalizeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceFinalizeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -850,6 +882,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_status( name: &str, body: &crate::v1_13::api::core::v1::Namespace, @@ -882,6 +915,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -891,6 +925,7 @@ pub struct ReplaceNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceStatusResponse { Ok(crate::v1_13::api::core::v1::Namespace), @@ -898,6 +933,7 @@ pub enum ReplaceNamespaceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -949,6 +985,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespace( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -967,12 +1004,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::watch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespaceResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/node.rs b/src/v1_13/api/core/v1/node.rs index 49b549fdaf..498549aeb4 100644 --- a/src/v1_13/api/core/v1/node.rs +++ b/src/v1_13/api/core/v1/node.rs @@ -29,6 +29,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy( name: &str, optional: ConnectDeleteNodeProxyOptional<'_>, @@ -52,6 +53,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -76,6 +78,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy_with_path( name: &str, path: &str, @@ -101,6 +104,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -121,6 +125,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy( name: &str, optional: ConnectGetNodeProxyOptional<'_>, @@ -144,6 +149,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -168,6 +174,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy_with_path( name: &str, path: &str, @@ -193,6 +200,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -213,6 +221,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy( name: &str, optional: ConnectPatchNodeProxyOptional<'_>, @@ -236,6 +245,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -260,6 +270,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy_with_path( name: &str, path: &str, @@ -285,6 +296,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -305,6 +317,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy( name: &str, optional: ConnectPostNodeProxyOptional<'_>, @@ -328,6 +341,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -352,6 +366,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy_with_path( name: &str, path: &str, @@ -377,6 +392,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -397,6 +413,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy( name: &str, optional: ConnectPutNodeProxyOptional<'_>, @@ -420,6 +437,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -444,6 +462,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy_with_path( name: &str, path: &str, @@ -469,6 +488,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -489,6 +509,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_node( body: &crate::v1_13::api::core::v1::Node, optional: CreateNodeOptional<'_>, @@ -522,6 +543,7 @@ impl Node { } /// Optional parameters of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -533,6 +555,7 @@ pub struct CreateNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNodeResponse { Ok(crate::v1_13::api::core::v1::Node), @@ -541,6 +564,7 @@ pub enum CreateNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -602,6 +626,7 @@ impl Node { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_node( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -622,6 +647,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_collection_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNodeResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -629,6 +655,7 @@ pub enum DeleteCollectionNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -687,6 +714,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_node( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -706,6 +734,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNodeResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -714,6 +743,7 @@ pub enum DeleteNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -778,6 +808,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_node( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -796,12 +827,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::list_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNodeResponse { Ok(crate::v1_13::api::core::v1::NodeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +882,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -876,12 +910,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeResponse { Ok(crate::v1_13::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -929,6 +965,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node_status( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -956,12 +993,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeStatusResponse { Ok(crate::v1_13::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1007,6 +1046,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node( name: &str, optional: ReadNodeOptional<'_>, @@ -1041,6 +1081,7 @@ impl Node { } /// Optional parameters of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1052,12 +1093,14 @@ pub struct ReadNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeResponse { Ok(crate::v1_13::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1103,6 +1146,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node_status( name: &str, optional: ReadNodeStatusOptional<'_>, @@ -1129,6 +1173,7 @@ impl Node { } /// Optional parameters of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1136,12 +1181,14 @@ pub struct ReadNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeStatusResponse { Ok(crate::v1_13::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1189,6 +1236,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node( name: &str, body: &crate::v1_13::api::core::v1::Node, @@ -1221,6 +1269,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1230,6 +1279,7 @@ pub struct ReplaceNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeResponse { Ok(crate::v1_13::api::core::v1::Node), @@ -1237,6 +1287,7 @@ pub enum ReplaceNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1292,6 +1343,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node_status( name: &str, body: &crate::v1_13::api::core::v1::Node, @@ -1324,6 +1376,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1333,6 +1386,7 @@ pub struct ReplaceNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeStatusResponse { Ok(crate::v1_13::api::core::v1::Node), @@ -1340,6 +1394,7 @@ pub enum ReplaceNodeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1391,6 +1446,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_node( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1409,12 +1465,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::watch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNodeResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/persistent_volume.rs b/src/v1_13/api/core/v1/persistent_volume.rs index 967360252d..a6aac5b595 100644 --- a/src/v1_13/api/core/v1/persistent_volume.rs +++ b/src/v1_13/api/core/v1/persistent_volume.rs @@ -29,6 +29,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_persistent_volume( body: &crate::v1_13::api::core::v1::PersistentVolume, optional: CreatePersistentVolumeOptional<'_>, @@ -62,6 +63,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePersistentVolumeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreatePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePersistentVolumeResponse { Ok(crate::v1_13::api::core::v1::PersistentVolume), @@ -81,6 +84,7 @@ pub enum CreatePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl PersistentVolume { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_persistent_volume( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -162,6 +167,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_collection_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPersistentVolumeResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteCollectionPersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -227,6 +234,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_persistent_volume( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -246,6 +254,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePersistentVolumeResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -254,6 +263,7 @@ pub enum DeletePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::list_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeResponse { Ok(crate::v1_13::api::core::v1::PersistentVolumeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeResponse { Ok(crate::v1_13::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume_status( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -496,12 +513,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeStatusResponse { Ok(crate::v1_13::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume( name: &str, optional: ReadPersistentVolumeOptional<'_>, @@ -581,6 +601,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -592,12 +613,14 @@ pub struct ReadPersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeResponse { Ok(crate::v1_13::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -643,6 +666,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume_status( name: &str, optional: ReadPersistentVolumeStatusOptional<'_>, @@ -669,6 +693,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,12 +701,14 @@ pub struct ReadPersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeStatusResponse { Ok(crate::v1_13::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -729,6 +756,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume( name: &str, body: &crate::v1_13::api::core::v1::PersistentVolume, @@ -761,6 +789,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -770,6 +799,7 @@ pub struct ReplacePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeResponse { Ok(crate::v1_13::api::core::v1::PersistentVolume), @@ -777,6 +807,7 @@ pub enum ReplacePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -832,6 +863,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume_status( name: &str, body: &crate::v1_13::api::core::v1::PersistentVolume, @@ -864,6 +896,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -873,6 +906,7 @@ pub struct ReplacePersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeStatusResponse { Ok(crate::v1_13::api::core::v1::PersistentVolume), @@ -880,6 +914,7 @@ pub enum ReplacePersistentVolumeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -931,6 +966,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -949,12 +985,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::watch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/persistent_volume_claim.rs b/src/v1_13/api/core/v1/persistent_volume_claim.rs index 054d222ecb..b6ab8d49b5 100644 --- a/src/v1_13/api/core/v1/persistent_volume_claim.rs +++ b/src/v1_13/api/core/v1/persistent_volume_claim.rs @@ -33,6 +33,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_persistent_volume_claim( namespace: &str, body: &crate::v1_13::api::core::v1::PersistentVolumeClaim, @@ -69,6 +70,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_13::api::core::v1::PersistentVolumeClaim), @@ -88,6 +91,7 @@ pub enum CreateNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl PersistentVolumeClaim { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_persistent_volume_claim( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_collection_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -363,12 +374,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_13::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume_claim_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_13::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_13::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_13::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_13::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_13::api::core::v1::PersistentVolumeClaim), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_13::api::core::v1::PersistentVolumeClaim), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume_claim_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/pod.rs b/src/v1_13/api/core/v1/pod.rs index 8281b64bc1..141a02bd92 100644 --- a/src/v1_13/api/core/v1/pod.rs +++ b/src/v1_13/api/core/v1/pod.rs @@ -33,6 +33,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -86,6 +88,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -137,6 +141,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_attach( name: &str, namespace: &str, @@ -178,6 +183,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -210,6 +216,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_exec( name: &str, namespace: &str, @@ -255,6 +262,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -289,6 +297,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_portforward( name: &str, namespace: &str, @@ -314,6 +323,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -338,6 +348,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy( name: &str, namespace: &str, @@ -363,6 +374,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -391,6 +403,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -418,6 +431,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -442,6 +456,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy( name: &str, namespace: &str, @@ -467,6 +482,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -495,6 +511,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -522,6 +539,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -546,6 +564,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_attach( name: &str, namespace: &str, @@ -587,6 +606,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -619,6 +639,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_exec( name: &str, namespace: &str, @@ -664,6 +685,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -698,6 +720,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_portforward( name: &str, namespace: &str, @@ -723,6 +746,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -747,6 +771,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy( name: &str, namespace: &str, @@ -772,6 +797,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -800,6 +826,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -827,6 +854,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -851,6 +879,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy( name: &str, namespace: &str, @@ -876,6 +905,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -904,6 +934,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -931,6 +962,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -955,6 +987,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod( namespace: &str, body: &crate::v1_13::api::core::v1::Pod, @@ -991,6 +1024,7 @@ impl Pod { } /// Optional parameters of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1002,6 +1036,7 @@ pub struct CreateNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodResponse { Ok(crate::v1_13::api::core::v1::Pod), @@ -1010,6 +1045,7 @@ pub enum CreateNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1075,6 +1111,7 @@ impl Pod { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -1098,6 +1135,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_collection_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -1105,6 +1143,7 @@ pub enum DeleteCollectionNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1167,6 +1206,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod( name: &str, namespace: &str, @@ -1188,6 +1228,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -1196,6 +1237,7 @@ pub enum DeleteNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1264,6 +1306,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -1285,12 +1328,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodResponse { Ok(crate::v1_13::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1334,6 +1379,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1352,12 +1398,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1409,6 +1457,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod( name: &str, namespace: &str, @@ -1438,12 +1487,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodResponse { Ok(crate::v1_13::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1495,6 +1546,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_status( name: &str, namespace: &str, @@ -1524,12 +1576,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodStatusResponse { Ok(crate::v1_13::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1579,6 +1633,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod( name: &str, namespace: &str, @@ -1615,6 +1670,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1626,12 +1682,14 @@ pub struct ReadNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodResponse { Ok(crate::v1_13::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1681,6 +1739,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_log( name: &str, namespace: &str, @@ -1737,6 +1796,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodLogOptional<'a> { /// The container for which to stream logs. Defaults to only container if there is one container in the pod. @@ -1758,12 +1818,14 @@ pub struct ReadNamespacedPodLogOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodLogResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodLogResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1823,6 +1885,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_status( name: &str, namespace: &str, @@ -1851,6 +1914,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1858,12 +1922,14 @@ pub struct ReadNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodStatusResponse { Ok(crate::v1_13::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1915,6 +1981,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod( name: &str, namespace: &str, @@ -1949,6 +2016,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1958,6 +2026,7 @@ pub struct ReplaceNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodResponse { Ok(crate::v1_13::api::core::v1::Pod), @@ -1965,6 +2034,7 @@ pub enum ReplaceNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2024,6 +2094,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_status( name: &str, namespace: &str, @@ -2058,6 +2129,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -2067,6 +2139,7 @@ pub struct ReplaceNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodStatusResponse { Ok(crate::v1_13::api::core::v1::Pod), @@ -2074,6 +2147,7 @@ pub enum ReplaceNamespacedPodStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2129,6 +2203,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -2150,12 +2225,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2201,6 +2278,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2219,12 +2297,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/pod_template.rs b/src/v1_13/api/core/v1/pod_template.rs index 1f7747db80..5b8de069f6 100644 --- a/src/v1_13/api/core/v1/pod_template.rs +++ b/src/v1_13/api/core/v1/pod_template.rs @@ -30,6 +30,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_template( namespace: &str, body: &crate::v1_13::api::core::v1::PodTemplate, @@ -66,6 +67,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodTemplateOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodTemplateResponse { Ok(crate::v1_13::api::core::v1::PodTemplate), @@ -85,6 +88,7 @@ pub enum CreateNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl PodTemplate { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_template( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_collection_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodTemplateResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_template( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodTemplateResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_template( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -360,12 +371,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodTemplateResponse { Ok(crate::v1_13::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_template_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodTemplateForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_template( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::patch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodTemplateResponse { Ok(crate::v1_13::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_template( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodTemplateOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -615,12 +636,14 @@ pub struct ReadNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodTemplateResponse { Ok(crate::v1_13::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_template( name: &str, namespace: &str, @@ -706,6 +730,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodTemplateOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -715,6 +740,7 @@ pub struct ReplaceNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodTemplateResponse { Ok(crate::v1_13::api::core::v1::PodTemplate), @@ -722,6 +748,7 @@ pub enum ReplaceNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -777,6 +804,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_template( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -798,12 +826,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodTemplateResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_template_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -867,12 +898,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodTemplateForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/replication_controller.rs b/src/v1_13/api/core/v1/replication_controller.rs index 7a3735ed5e..e49b2ee17d 100644 --- a/src/v1_13/api/core/v1/replication_controller.rs +++ b/src/v1_13/api/core/v1/replication_controller.rs @@ -33,6 +33,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replication_controller( namespace: &str, body: &crate::v1_13::api::core::v1::ReplicationController, @@ -69,6 +70,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicationControllerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicationControllerResponse { Ok(crate::v1_13::api::core::v1::ReplicationController), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicationController { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replication_controller( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_collection_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicationControllerResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replication_controller( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicationControllerResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replication_controller( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicationControllerResponse { Ok(crate::v1_13::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replication_controller_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicationControllerForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerResponse { Ok(crate::v1_13::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerStatusResponse { Ok(crate::v1_13::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerResponse { Ok(crate::v1_13::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerStatusResponse { Ok(crate::v1_13::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerResponse { Ok(crate::v1_13::api::core::v1::ReplicationController), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerStatusResponse { Ok(crate::v1_13::api::core::v1::ReplicationController), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedReplicationControllerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replication_controller( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicationControllerResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replication_controller_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicationControllerForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/resource_quota.rs b/src/v1_13/api/core/v1/resource_quota.rs index a5d531b545..821c9a1f5f 100644 --- a/src/v1_13/api/core/v1/resource_quota.rs +++ b/src/v1_13/api/core/v1/resource_quota.rs @@ -33,6 +33,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_resource_quota( namespace: &str, body: &crate::v1_13::api::core::v1::ResourceQuota, @@ -69,6 +70,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedResourceQuotaOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedResourceQuotaResponse { Ok(crate::v1_13::api::core::v1::ResourceQuota), @@ -88,6 +91,7 @@ pub enum CreateNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ResourceQuota { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_resource_quota( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_collection_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedResourceQuotaResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_resource_quota( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedResourceQuotaResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_resource_quota( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedResourceQuotaResponse { Ok(crate::v1_13::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_resource_quota_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListResourceQuotaForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaResponse { Ok(crate::v1_13::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaStatusResponse { Ok(crate::v1_13::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaResponse { Ok(crate::v1_13::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaStatusResponse { Ok(crate::v1_13::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaResponse { Ok(crate::v1_13::api::core::v1::ResourceQuota), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaStatusResponse { Ok(crate::v1_13::api::core::v1::ResourceQuota), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedResourceQuotaStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_resource_quota( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedResourceQuotaResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_resource_quota_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchResourceQuotaForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/secret.rs b/src/v1_13/api/core/v1/secret.rs index e7b79cd134..26acd930bf 100644 --- a/src/v1_13/api/core/v1/secret.rs +++ b/src/v1_13/api/core/v1/secret.rs @@ -36,6 +36,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_secret( namespace: &str, body: &crate::v1_13::api::core::v1::Secret, @@ -72,6 +73,7 @@ impl Secret { } /// Optional parameters of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedSecretOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedSecretResponse { Ok(crate::v1_13::api::core::v1::Secret), @@ -91,6 +94,7 @@ pub enum CreateNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -156,6 +160,7 @@ impl Secret { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_secret( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -179,6 +184,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_collection_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedSecretResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -248,6 +255,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_secret( name: &str, namespace: &str, @@ -269,6 +277,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedSecretResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -277,6 +286,7 @@ pub enum DeleteNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -345,6 +355,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_secret( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -366,12 +377,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedSecretResponse { Ok(crate::v1_13::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -415,6 +428,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_secret_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -433,12 +447,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListSecretForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -490,6 +506,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_secret( name: &str, namespace: &str, @@ -519,12 +536,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::patch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedSecretResponse { Ok(crate::v1_13::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -574,6 +593,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_secret( name: &str, namespace: &str, @@ -610,6 +630,7 @@ impl Secret { } /// Optional parameters of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedSecretOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -621,12 +642,14 @@ pub struct ReadNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedSecretResponse { Ok(crate::v1_13::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -678,6 +701,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_secret( name: &str, namespace: &str, @@ -712,6 +736,7 @@ impl Secret { } /// Optional parameters of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedSecretOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedSecretResponse { Ok(crate::v1_13::api::core::v1::Secret), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +810,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_secret( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -804,12 +832,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedSecretResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_secret_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -873,12 +904,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchSecretForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/service.rs b/src/v1_13/api/core/v1/service.rs index 01bc18615e..db218021e3 100644 --- a/src/v1_13/api/core/v1/service.rs +++ b/src/v1_13/api/core/v1/service.rs @@ -33,6 +33,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -86,6 +88,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -137,6 +141,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy( name: &str, namespace: &str, @@ -162,6 +167,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -190,6 +196,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -217,6 +224,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -241,6 +249,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy( name: &str, namespace: &str, @@ -266,6 +275,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -294,6 +304,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -321,6 +332,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -345,6 +357,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy( name: &str, namespace: &str, @@ -370,6 +383,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -398,6 +412,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -425,6 +440,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -449,6 +465,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy( name: &str, namespace: &str, @@ -474,6 +491,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -502,6 +520,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -529,6 +548,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -553,6 +573,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service( namespace: &str, body: &crate::v1_13::api::core::v1::Service, @@ -589,6 +610,7 @@ impl Service { } /// Optional parameters of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct CreateNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceResponse { Ok(crate::v1_13::api::core::v1::Service), @@ -608,6 +631,7 @@ pub enum CreateNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -673,6 +697,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service( name: &str, namespace: &str, @@ -694,6 +719,7 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -702,6 +728,7 @@ pub enum DeleteNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -770,6 +797,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -791,12 +819,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceResponse { Ok(crate::v1_13::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +870,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -858,12 +889,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -915,6 +948,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service( name: &str, namespace: &str, @@ -944,12 +978,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceResponse { Ok(crate::v1_13::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1001,6 +1037,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_status( name: &str, namespace: &str, @@ -1030,12 +1067,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceStatusResponse { Ok(crate::v1_13::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1085,6 +1124,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service( name: &str, namespace: &str, @@ -1121,6 +1161,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1132,12 +1173,14 @@ pub struct ReadNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceResponse { Ok(crate::v1_13::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1187,6 +1230,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_status( name: &str, namespace: &str, @@ -1215,6 +1259,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1222,12 +1267,14 @@ pub struct ReadNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceStatusResponse { Ok(crate::v1_13::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1279,6 +1326,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service( name: &str, namespace: &str, @@ -1313,6 +1361,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1322,6 +1371,7 @@ pub struct ReplaceNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceResponse { Ok(crate::v1_13::api::core::v1::Service), @@ -1329,6 +1379,7 @@ pub enum ReplaceNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1388,6 +1439,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_status( name: &str, namespace: &str, @@ -1422,6 +1474,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1431,6 +1484,7 @@ pub struct ReplaceNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceStatusResponse { Ok(crate::v1_13::api::core::v1::Service), @@ -1438,6 +1492,7 @@ pub enum ReplaceNamespacedServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1493,6 +1548,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1514,12 +1570,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1565,6 +1623,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1583,12 +1642,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/core/v1/service_account.rs b/src/v1_13/api/core/v1/service_account.rs index 22856c43db..97ddcf8235 100644 --- a/src/v1_13/api/core/v1/service_account.rs +++ b/src/v1_13/api/core/v1/service_account.rs @@ -36,6 +36,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service_account( namespace: &str, body: &crate::v1_13::api::core::v1::ServiceAccount, @@ -72,6 +73,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceAccountOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceAccountResponse { Ok(crate::v1_13::api::core::v1::ServiceAccount), @@ -91,6 +94,7 @@ pub enum CreateNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -156,6 +160,7 @@ impl ServiceAccount { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_service_account( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -179,6 +184,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_collection_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedServiceAccountResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -248,6 +255,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service_account( name: &str, namespace: &str, @@ -269,6 +277,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceAccountResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -277,6 +286,7 @@ pub enum DeleteNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -345,6 +355,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service_account( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -366,12 +377,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceAccountResponse { Ok(crate::v1_13::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -415,6 +428,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_account_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -433,12 +447,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceAccountForAllNamespacesResponse { Ok(crate::v1_13::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -490,6 +506,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_account( name: &str, namespace: &str, @@ -519,12 +536,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::patch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceAccountResponse { Ok(crate::v1_13::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -574,6 +593,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_account( name: &str, namespace: &str, @@ -610,6 +630,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceAccountOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -621,12 +642,14 @@ pub struct ReadNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceAccountResponse { Ok(crate::v1_13::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -678,6 +701,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_account( name: &str, namespace: &str, @@ -712,6 +736,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceAccountOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceAccountResponse { Ok(crate::v1_13::api::core::v1::ServiceAccount), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +810,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service_account( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -804,12 +832,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceAccountResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_account_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -873,12 +904,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceAccountForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/events/v1beta1/event.rs b/src/v1_13/api/events/v1beta1/event.rs index 768436ece0..cfc0574982 100644 --- a/src/v1_13/api/events/v1beta1/event.rs +++ b/src/v1_13/api/events/v1beta1/event.rs @@ -68,6 +68,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_13::api::events::v1beta1::Event, @@ -104,6 +105,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -115,6 +117,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_13::api::events::v1beta1::Event), @@ -123,6 +126,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -188,6 +192,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -211,6 +216,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -218,6 +224,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -280,6 +287,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -301,6 +309,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -309,6 +318,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +383,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +402,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_13::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -444,6 +457,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -465,12 +479,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_13::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -522,6 +538,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -551,12 +568,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_13::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -606,6 +625,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -642,6 +662,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -653,12 +674,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_13::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -710,6 +733,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -744,6 +768,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -753,6 +778,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_13::api::events::v1beta1::Event), @@ -760,6 +786,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -811,6 +838,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -829,12 +857,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -884,6 +914,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -905,12 +936,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/events/v1beta1/mod.rs b/src/v1_13/api/events/v1beta1/mod.rs index 34d0b5bf3a..0029a47de6 100644 --- a/src/v1_13/api/events/v1beta1/mod.rs +++ b/src/v1_13/api/events/v1beta1/mod.rs @@ -1,25 +1,19 @@ mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; diff --git a/src/v1_13/api/extensions/v1beta1/daemon_set.rs b/src/v1_13/api/extensions/v1beta1/daemon_set.rs index 86996cfeca..7f8365a3f6 100644 --- a/src/v1_13/api/extensions/v1beta1/daemon_set.rs +++ b/src/v1_13/api/extensions/v1beta1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_13::api::extensions::v1beta1::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_13::api::extensions::v1beta1::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_13::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_13::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_13::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_13::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_13::api::extensions::v1beta1::DaemonSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::DaemonSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/extensions/v1beta1/deployment.rs b/src/v1_13/api/extensions/v1beta1/deployment.rs index 8c411c4c94..1b957cf3a6 100644 --- a/src/v1_13/api/extensions/v1beta1/deployment.rs +++ b/src/v1_13/api/extensions/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_13::api::extensions::v1beta1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_13::api::extensions::v1beta1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_13::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_13::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_13::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_13::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_13::api::extensions::v1beta1::Deployment), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::Deployment), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/extensions/v1beta1/deployment_rollback.rs b/src/v1_13/api/extensions/v1beta1/deployment_rollback.rs index a874405542..c46c19d916 100644 --- a/src/v1_13/api/extensions/v1beta1/deployment_rollback.rs +++ b/src/v1_13/api/extensions/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -75,6 +76,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -86,6 +88,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -94,6 +97,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/extensions/v1beta1/ingress.rs b/src/v1_13/api/extensions/v1beta1/ingress.rs index 0cd733c9d5..88eadb3728 100644 --- a/src/v1_13/api/extensions/v1beta1/ingress.rs +++ b/src/v1_13/api/extensions/v1beta1/ingress.rs @@ -33,6 +33,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_ingress( namespace: &str, body: &crate::v1_13::api::extensions::v1beta1::Ingress, @@ -69,6 +70,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedIngressResponse { Ok(crate::v1_13::api::extensions::v1beta1::Ingress), @@ -88,6 +91,7 @@ pub enum CreateNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Ingress { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_ingress( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_collection_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedIngressResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_ingress( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedIngressResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_ingress_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListIngressForAllNamespacesResponse { Ok(crate::v1_13::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_ingress( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedIngressResponse { Ok(crate::v1_13::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressResponse { Ok(crate::v1_13::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressResponse { Ok(crate::v1_13::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressResponse { Ok(crate::v1_13::api::extensions::v1beta1::Ingress), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::Ingress), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedIngressStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1061,6 +1099,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_ingress_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1079,12 +1118,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchIngressForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1134,6 +1175,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_ingress( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1155,12 +1197,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedIngressResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/extensions/v1beta1/mod.rs b/src/v1_13/api/extensions/v1beta1/mod.rs index 56daf1a50d..9453669df6 100644 --- a/src/v1_13/api/extensions/v1beta1/mod.rs +++ b/src/v1_13/api/extensions/v1beta1/mod.rs @@ -1,345 +1,239 @@ mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod http_ingress_path; -pub use self::http_ingress_path::{ - HTTPIngressPath, -}; +pub use self::http_ingress_path::HTTPIngressPath; mod http_ingress_rule_value; -pub use self::http_ingress_rule_value::{ - HTTPIngressRuleValue, -}; +pub use self::http_ingress_rule_value::HTTPIngressRuleValue; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod ingress; -pub use self::ingress::{ - Ingress, - CreateNamespacedIngressOptional, CreateNamespacedIngressResponse, - DeleteCollectionNamespacedIngressResponse, - DeleteNamespacedIngressResponse, - ListIngressForAllNamespacesResponse, - ListNamespacedIngressResponse, - PatchNamespacedIngressResponse, - PatchNamespacedIngressStatusResponse, - ReadNamespacedIngressOptional, ReadNamespacedIngressResponse, - ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse, - ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse, - ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse, - WatchIngressForAllNamespacesResponse, - WatchNamespacedIngressResponse, -}; +pub use self::ingress::Ingress; +#[cfg(feature = "api")] pub use self::ingress::{CreateNamespacedIngressOptional, CreateNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::DeleteCollectionNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::DeleteNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::ListIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::ListNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressStatusResponse; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressOptional, ReadNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::WatchIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::WatchNamespacedIngressResponse; mod ingress_backend; -pub use self::ingress_backend::{ - IngressBackend, -}; +pub use self::ingress_backend::IngressBackend; mod ingress_list; -pub use self::ingress_list::{ - IngressList, -}; +pub use self::ingress_list::IngressList; mod ingress_rule; -pub use self::ingress_rule::{ - IngressRule, -}; +pub use self::ingress_rule::IngressRule; mod ingress_spec; -pub use self::ingress_spec::{ - IngressSpec, -}; +pub use self::ingress_spec::IngressSpec; mod ingress_status; -pub use self::ingress_status::{ - IngressStatus, -}; +pub use self::ingress_status::IngressStatus; mod ingress_tls; -pub use self::ingress_tls::{ - IngressTLS, -}; +pub use self::ingress_tls::IngressTLS; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod run_as_group_strategy_options; -pub use self::run_as_group_strategy_options::{ - RunAsGroupStrategyOptions, -}; +pub use self::run_as_group_strategy_options::RunAsGroupStrategyOptions; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedReplicationControllerDummyScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerDummyScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_13/api/extensions/v1beta1/network_policy.rs b/src/v1_13/api/extensions/v1beta1/network_policy.rs index 1593c15d86..2c40a2cc7f 100644 --- a/src/v1_13/api/extensions/v1beta1/network_policy.rs +++ b/src/v1_13/api/extensions/v1beta1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_13::api::extensions::v1beta1::NetworkPolicy, @@ -66,6 +67,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_13::api::extensions::v1beta1::NetworkPolicy), @@ -85,6 +88,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -360,12 +371,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_13::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_13::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_13::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -615,12 +636,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_13::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -706,6 +730,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -715,6 +740,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_13::api::extensions::v1beta1::NetworkPolicy), @@ -722,6 +748,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -777,6 +804,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -798,12 +826,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -867,12 +898,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/extensions/v1beta1/pod_security_policy.rs b/src/v1_13/api/extensions/v1beta1/pod_security_policy.rs index 4745304732..22c4395bd7 100644 --- a/src/v1_13/api/extensions/v1beta1/pod_security_policy.rs +++ b/src/v1_13/api/extensions/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_13::api::extensions::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -59,6 +60,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_13::api::extensions::v1beta1::PodSecurityPolicy), @@ -78,6 +81,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -159,6 +164,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_13::api::extensions::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_13::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -498,6 +515,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -509,12 +527,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_13::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_13::api::extensions::v1beta1::PodSecurityPolicy, @@ -594,6 +615,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -603,6 +625,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_13::api::extensions::v1beta1::PodSecurityPolicy), @@ -610,6 +633,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -679,12 +704,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/extensions/v1beta1/replica_set.rs b/src/v1_13/api/extensions/v1beta1/replica_set.rs index 9752567dea..c4657794e9 100644 --- a/src/v1_13/api/extensions/v1beta1/replica_set.rs +++ b/src/v1_13/api/extensions/v1beta1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_13::api::extensions::v1beta1::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_13::api::extensions::v1beta1::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_13::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_13::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_13::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_13::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -885,6 +916,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -894,6 +926,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_13::api::extensions::v1beta1::ReplicaSet), @@ -901,6 +934,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -960,6 +994,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -994,6 +1029,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1003,6 +1039,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_13::api::extensions::v1beta1::ReplicaSet), @@ -1010,6 +1047,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1103,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1086,12 +1125,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1178,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1155,12 +1197,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/extensions/v1beta1/scale.rs b/src/v1_13/api/extensions/v1beta1/scale.rs index 42e59b30a3..244fdec0ed 100644 --- a/src/v1_13/api/extensions/v1beta1/scale.rs +++ b/src/v1_13/api/extensions/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_13::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_13::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_13::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_13::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -599,6 +621,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -608,6 +631,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_13::api::extensions::v1beta1::Scale), @@ -615,6 +639,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -674,6 +699,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -708,6 +734,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -717,6 +744,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_13::api::extensions::v1beta1::Scale), @@ -724,6 +752,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +812,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -817,6 +847,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -826,6 +857,7 @@ pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_13::api::extensions::v1beta1::Scale), @@ -833,6 +865,7 @@ pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/networking/v1/mod.rs b/src/v1_13/api/networking/v1/mod.rs index fcd95f99a8..23233ec53d 100644 --- a/src/v1_13/api/networking/v1/mod.rs +++ b/src/v1_13/api/networking/v1/mod.rs @@ -1,50 +1,34 @@ mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; diff --git a/src/v1_13/api/networking/v1/network_policy.rs b/src/v1_13/api/networking/v1/network_policy.rs index 9a48ed5629..4c28e09b53 100644 --- a/src/v1_13/api/networking/v1/network_policy.rs +++ b/src/v1_13/api/networking/v1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_13::api::networking::v1::NetworkPolicy, @@ -66,6 +67,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_13::api::networking::v1::NetworkPolicy), @@ -85,6 +88,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -360,12 +371,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_13::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_13::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_13::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -615,12 +636,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_13::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -706,6 +730,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -715,6 +740,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_13::api::networking::v1::NetworkPolicy), @@ -722,6 +748,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -777,6 +804,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -798,12 +826,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +879,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -867,12 +898,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/policy/v1beta1/eviction.rs b/src/v1_13/api/policy/v1beta1/eviction.rs index aecd33814d..1d957e3ead 100644 --- a/src/v1_13/api/policy/v1beta1/eviction.rs +++ b/src/v1_13/api/policy/v1beta1/eviction.rs @@ -34,6 +34,7 @@ impl Eviction { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_eviction( name: &str, namespace: &str, @@ -72,6 +73,7 @@ impl Eviction { } /// Optional parameters of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodEvictionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedPodEvictionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodEvictionResponse { Ok(crate::v1_13::api::policy::v1beta1::Eviction), @@ -91,6 +94,7 @@ pub enum CreateNamespacedPodEvictionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodEvictionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/policy/v1beta1/mod.rs b/src/v1_13/api/policy/v1beta1/mod.rs index 3b686f69bc..f53ac90792 100644 --- a/src/v1_13/api/policy/v1beta1/mod.rs +++ b/src/v1_13/api/policy/v1beta1/mod.rs @@ -1,107 +1,73 @@ mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod eviction; -pub use self::eviction::{ - Eviction, - CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse, -}; +pub use self::eviction::Eviction; +#[cfg(feature = "api")] pub use self::eviction::{CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse}; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod pod_disruption_budget; -pub use self::pod_disruption_budget::{ - PodDisruptionBudget, - CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse, - DeleteCollectionNamespacedPodDisruptionBudgetResponse, - DeleteNamespacedPodDisruptionBudgetResponse, - ListNamespacedPodDisruptionBudgetResponse, - ListPodDisruptionBudgetForAllNamespacesResponse, - PatchNamespacedPodDisruptionBudgetResponse, - PatchNamespacedPodDisruptionBudgetStatusResponse, - ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse, - ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse, - ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse, - ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse, - WatchNamespacedPodDisruptionBudgetResponse, - WatchPodDisruptionBudgetForAllNamespacesResponse, -}; +pub use self::pod_disruption_budget::PodDisruptionBudget; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteCollectionNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListPodDisruptionBudgetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetStatusResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchPodDisruptionBudgetForAllNamespacesResponse; mod pod_disruption_budget_list; -pub use self::pod_disruption_budget_list::{ - PodDisruptionBudgetList, -}; +pub use self::pod_disruption_budget_list::PodDisruptionBudgetList; mod pod_disruption_budget_spec; -pub use self::pod_disruption_budget_spec::{ - PodDisruptionBudgetSpec, -}; +pub use self::pod_disruption_budget_spec::PodDisruptionBudgetSpec; mod pod_disruption_budget_status; -pub use self::pod_disruption_budget_status::{ - PodDisruptionBudgetStatus, -}; +pub use self::pod_disruption_budget_status::PodDisruptionBudgetStatus; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod run_as_group_strategy_options; -pub use self::run_as_group_strategy_options::{ - RunAsGroupStrategyOptions, -}; +pub use self::run_as_group_strategy_options::RunAsGroupStrategyOptions; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_13/api/policy/v1beta1/pod_disruption_budget.rs b/src/v1_13/api/policy/v1beta1/pod_disruption_budget.rs index 56112cb239..ecab2a5679 100644 --- a/src/v1_13/api/policy/v1beta1/pod_disruption_budget.rs +++ b/src/v1_13/api/policy/v1beta1/pod_disruption_budget.rs @@ -32,6 +32,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_disruption_budget( namespace: &str, body: &crate::v1_13::api::policy::v1beta1::PodDisruptionBudget, @@ -68,6 +69,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_13::api::policy::v1beta1::PodDisruptionBudget), @@ -87,6 +90,7 @@ pub enum CreateNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -152,6 +156,7 @@ impl PodDisruptionBudget { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_disruption_budget( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -175,6 +180,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_collection_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -182,6 +188,7 @@ pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -265,6 +273,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -273,6 +282,7 @@ pub enum DeleteNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -341,6 +351,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -362,12 +373,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_13::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -411,6 +424,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_disruption_budget_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -429,12 +443,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_13::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -486,6 +502,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -515,12 +532,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_13::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -572,6 +591,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -601,12 +621,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_13::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -656,6 +678,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -692,6 +715,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -703,12 +727,14 @@ pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_13::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -758,6 +784,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -786,6 +813,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -793,12 +821,14 @@ pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_13::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -850,6 +880,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -884,6 +915,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -893,6 +925,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_13::api::policy::v1beta1::PodDisruptionBudget), @@ -900,6 +933,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -959,6 +993,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -993,6 +1028,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1002,6 +1038,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_13::api::policy::v1beta1::PodDisruptionBudget), @@ -1009,6 +1046,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1064,6 +1102,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -1085,12 +1124,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1136,6 +1177,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_disruption_budget_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1154,12 +1196,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/policy/v1beta1/pod_security_policy.rs b/src/v1_13/api/policy/v1beta1/pod_security_policy.rs index 31ac60c242..281cf257f3 100644 --- a/src/v1_13/api/policy/v1beta1/pod_security_policy.rs +++ b/src/v1_13/api/policy/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_13::api::policy::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -59,6 +60,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_13::api::policy::v1beta1::PodSecurityPolicy), @@ -78,6 +81,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -159,6 +164,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_13::api::policy::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_13::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -498,6 +515,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -509,12 +527,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_13::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_13::api::policy::v1beta1::PodSecurityPolicy, @@ -594,6 +615,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -603,6 +625,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_13::api::policy::v1beta1::PodSecurityPolicy), @@ -610,6 +633,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -679,12 +704,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1/cluster_role.rs b/src/v1_13/api/rbac/v1/cluster_role.rs index cf8e44f232..dab78f875d 100644 --- a/src/v1_13/api/rbac/v1/cluster_role.rs +++ b/src/v1_13/api/rbac/v1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_13::api::rbac::v1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_13::api::rbac::v1::ClusterRole, @@ -585,6 +606,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1::ClusterRole), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1/cluster_role_binding.rs b/src/v1_13/api/rbac/v1/cluster_role_binding.rs index 4ffea9c158..7e8ab62ced 100644 --- a/src/v1_13/api/rbac/v1/cluster_role_binding.rs +++ b/src/v1_13/api/rbac/v1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_13::api::rbac::v1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_13::api::rbac::v1::ClusterRoleBinding, @@ -585,6 +606,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1::ClusterRoleBinding), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1/mod.rs b/src/v1_13/api/rbac/v1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_13/api/rbac/v1/mod.rs +++ b/src/v1_13/api/rbac/v1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_13/api/rbac/v1/role.rs b/src/v1_13/api/rbac/v1/role.rs index bf126546ed..d9e64e54ee 100644 --- a/src/v1_13/api/rbac/v1/role.rs +++ b/src/v1_13/api/rbac/v1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_13::api::rbac::v1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_13::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -694,6 +718,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -703,6 +728,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1::Role), @@ -710,6 +736,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -765,6 +792,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -786,12 +814,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +867,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -855,12 +886,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1/role_binding.rs b/src/v1_13/api/rbac/v1/role_binding.rs index 1e868aa4a5..b5cefcf1e3 100644 --- a/src/v1_13/api/rbac/v1/role_binding.rs +++ b/src/v1_13/api/rbac/v1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_13::api::rbac::v1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_13::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -697,6 +721,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -706,6 +731,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1::RoleBinding), @@ -713,6 +739,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -768,6 +795,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -789,12 +817,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +870,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -858,12 +889,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1alpha1/cluster_role.rs b/src/v1_13/api/rbac/v1alpha1/cluster_role.rs index 2734127ae6..6ccfe0c6e9 100644 --- a/src/v1_13/api/rbac/v1alpha1/cluster_role.rs +++ b/src/v1_13/api/rbac/v1alpha1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_13::api::rbac::v1alpha1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1alpha1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1alpha1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_13::api::rbac::v1alpha1::ClusterRole, @@ -585,6 +606,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1alpha1::ClusterRole), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1alpha1/cluster_role_binding.rs b/src/v1_13/api/rbac/v1alpha1/cluster_role_binding.rs index 6df1f64011..39d1c3f2ee 100644 --- a/src/v1_13/api/rbac/v1alpha1/cluster_role_binding.rs +++ b/src/v1_13/api/rbac/v1alpha1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_13::api::rbac::v1alpha1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1alpha1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1alpha1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_13::api::rbac::v1alpha1::ClusterRoleBinding, @@ -585,6 +606,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1alpha1::ClusterRoleBinding), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1alpha1/mod.rs b/src/v1_13/api/rbac/v1alpha1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_13/api/rbac/v1alpha1/mod.rs +++ b/src/v1_13/api/rbac/v1alpha1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_13/api/rbac/v1alpha1/role.rs b/src/v1_13/api/rbac/v1alpha1/role.rs index d355a53c7c..637ae0f375 100644 --- a/src/v1_13/api/rbac/v1alpha1/role.rs +++ b/src/v1_13/api/rbac/v1alpha1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_13::api::rbac::v1alpha1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1alpha1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_13::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -694,6 +718,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -703,6 +728,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1alpha1::Role), @@ -710,6 +736,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -765,6 +792,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -786,12 +814,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +867,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -855,12 +886,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1alpha1/role_binding.rs b/src/v1_13/api/rbac/v1alpha1/role_binding.rs index ecd469c8f0..43eb766c1f 100644 --- a/src/v1_13/api/rbac/v1alpha1/role_binding.rs +++ b/src/v1_13/api/rbac/v1alpha1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_13::api::rbac::v1alpha1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1alpha1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_13::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -697,6 +721,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -706,6 +731,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1alpha1::RoleBinding), @@ -713,6 +739,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -768,6 +795,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -789,12 +817,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +870,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -858,12 +889,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1beta1/cluster_role.rs b/src/v1_13/api/rbac/v1beta1/cluster_role.rs index 0b640b1808..0a7fdabd2c 100644 --- a/src/v1_13/api/rbac/v1beta1/cluster_role.rs +++ b/src/v1_13/api/rbac/v1beta1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_13::api::rbac::v1beta1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1beta1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1beta1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_13::api::rbac::v1beta1::ClusterRole, @@ -585,6 +606,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_13::api::rbac::v1beta1::ClusterRole), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1beta1/cluster_role_binding.rs b/src/v1_13/api/rbac/v1beta1/cluster_role_binding.rs index 43078498a0..38d08087e1 100644 --- a/src/v1_13/api/rbac/v1beta1/cluster_role_binding.rs +++ b/src/v1_13/api/rbac/v1beta1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_13::api::rbac::v1beta1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1beta1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1beta1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_13::api::rbac::v1beta1::ClusterRoleBinding, @@ -585,6 +606,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -594,6 +616,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1beta1::ClusterRoleBinding), @@ -601,6 +624,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -652,6 +676,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -670,12 +695,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1beta1/mod.rs b/src/v1_13/api/rbac/v1beta1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_13/api/rbac/v1beta1/mod.rs +++ b/src/v1_13/api/rbac/v1beta1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_13/api/rbac/v1beta1/role.rs b/src/v1_13/api/rbac/v1beta1/role.rs index 5a3bf166c0..9cda0e15f1 100644 --- a/src/v1_13/api/rbac/v1beta1/role.rs +++ b/src/v1_13/api/rbac/v1beta1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_13::api::rbac::v1beta1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1beta1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_13::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -694,6 +718,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -703,6 +728,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_13::api::rbac::v1beta1::Role), @@ -710,6 +736,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -765,6 +792,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -786,12 +814,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +867,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -855,12 +886,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/rbac/v1beta1/role_binding.rs b/src/v1_13/api/rbac/v1beta1/role_binding.rs index 4984b44116..3215c626b6 100644 --- a/src/v1_13/api/rbac/v1beta1/role_binding.rs +++ b/src/v1_13/api/rbac/v1beta1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_13::api::rbac::v1beta1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1beta1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_13::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -697,6 +721,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -706,6 +731,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_13::api::rbac::v1beta1::RoleBinding), @@ -713,6 +739,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -768,6 +795,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -789,12 +817,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +870,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -858,12 +889,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/scheduling/v1alpha1/mod.rs b/src/v1_13/api/scheduling/v1alpha1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_13/api/scheduling/v1alpha1/mod.rs +++ b/src/v1_13/api/scheduling/v1alpha1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_13/api/scheduling/v1alpha1/priority_class.rs b/src/v1_13/api/scheduling/v1alpha1/priority_class.rs index 1ce243fd72..203bbae315 100644 --- a/src/v1_13/api/scheduling/v1alpha1/priority_class.rs +++ b/src/v1_13/api/scheduling/v1alpha1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_13::api::scheduling::v1alpha1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -65,6 +66,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -76,6 +78,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_13::api::scheduling::v1alpha1::PriorityClass), @@ -84,6 +87,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -145,6 +149,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -165,6 +170,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -172,6 +178,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -249,6 +257,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -257,6 +266,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -339,12 +350,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_13::api::scheduling::v1alpha1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -392,6 +405,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -419,12 +433,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_13::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -470,6 +486,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -504,6 +521,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -515,12 +533,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_13::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +588,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_13::api::scheduling::v1alpha1::PriorityClass, @@ -600,6 +621,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_13::api::scheduling::v1alpha1::PriorityClass), @@ -616,6 +639,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/scheduling/v1beta1/mod.rs b/src/v1_13/api/scheduling/v1beta1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_13/api/scheduling/v1beta1/mod.rs +++ b/src/v1_13/api/scheduling/v1beta1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_13/api/scheduling/v1beta1/priority_class.rs b/src/v1_13/api/scheduling/v1beta1/priority_class.rs index 2a3e650e3b..bdc3982c61 100644 --- a/src/v1_13/api/scheduling/v1beta1/priority_class.rs +++ b/src/v1_13/api/scheduling/v1beta1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_13::api::scheduling::v1beta1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -65,6 +66,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -76,6 +78,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_13::api::scheduling::v1beta1::PriorityClass), @@ -84,6 +87,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -145,6 +149,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -165,6 +170,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -172,6 +178,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -249,6 +257,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -257,6 +266,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -339,12 +350,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_13::api::scheduling::v1beta1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -392,6 +405,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -419,12 +433,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_13::api::scheduling::v1beta1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -470,6 +486,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -504,6 +521,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -515,12 +533,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_13::api::scheduling::v1beta1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +588,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_13::api::scheduling::v1beta1::PriorityClass, @@ -600,6 +621,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_13::api::scheduling::v1beta1::PriorityClass), @@ -616,6 +639,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/settings/v1alpha1/mod.rs b/src/v1_13/api/settings/v1alpha1/mod.rs index f0ebd9df12..7816e600a8 100644 --- a/src/v1_13/api/settings/v1alpha1/mod.rs +++ b/src/v1_13/api/settings/v1alpha1/mod.rs @@ -1,25 +1,19 @@ mod pod_preset; -pub use self::pod_preset::{ - PodPreset, - CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse, - DeleteCollectionNamespacedPodPresetResponse, - DeleteNamespacedPodPresetResponse, - ListNamespacedPodPresetResponse, - ListPodPresetForAllNamespacesResponse, - PatchNamespacedPodPresetResponse, - ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse, - ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse, - WatchNamespacedPodPresetResponse, - WatchPodPresetForAllNamespacesResponse, -}; +pub use self::pod_preset::PodPreset; +#[cfg(feature = "api")] pub use self::pod_preset::{CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteCollectionNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListPodPresetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_preset::PatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::{ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::{ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::WatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::WatchPodPresetForAllNamespacesResponse; mod pod_preset_list; -pub use self::pod_preset_list::{ - PodPresetList, -}; +pub use self::pod_preset_list::PodPresetList; mod pod_preset_spec; -pub use self::pod_preset_spec::{ - PodPresetSpec, -}; +pub use self::pod_preset_spec::PodPresetSpec; diff --git a/src/v1_13/api/settings/v1alpha1/pod_preset.rs b/src/v1_13/api/settings/v1alpha1/pod_preset.rs index 58235d47f0..0baaf4fa45 100644 --- a/src/v1_13/api/settings/v1alpha1/pod_preset.rs +++ b/src/v1_13/api/settings/v1alpha1/pod_preset.rs @@ -28,6 +28,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_preset( namespace: &str, body: &crate::v1_13::api::settings::v1alpha1::PodPreset, @@ -64,6 +65,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodPresetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodPresetResponse { Ok(crate::v1_13::api::settings::v1alpha1::PodPreset), @@ -83,6 +86,7 @@ pub enum CreateNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -148,6 +152,7 @@ impl PodPreset { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_preset( namespace: &str, delete_optional: crate::v1_13::DeleteOptional<'_>, @@ -171,6 +176,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_collection_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodPresetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -178,6 +184,7 @@ pub enum DeleteCollectionNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -240,6 +247,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_preset( name: &str, namespace: &str, @@ -261,6 +269,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodPresetResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -269,6 +278,7 @@ pub enum DeleteNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -337,6 +347,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_preset( namespace: &str, optional: crate::v1_13::ListOptional<'_>, @@ -358,12 +369,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodPresetResponse { Ok(crate::v1_13::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -407,6 +420,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_preset_for_all_namespaces( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -425,12 +439,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodPresetForAllNamespacesResponse { Ok(crate::v1_13::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -482,6 +498,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_preset( name: &str, namespace: &str, @@ -511,12 +528,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::patch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodPresetResponse { Ok(crate::v1_13::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -566,6 +585,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_preset( name: &str, namespace: &str, @@ -602,6 +622,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodPresetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -613,12 +634,14 @@ pub struct ReadNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodPresetResponse { Ok(crate::v1_13::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -670,6 +693,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_preset( name: &str, namespace: &str, @@ -704,6 +728,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodPresetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -713,6 +738,7 @@ pub struct ReplaceNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodPresetResponse { Ok(crate::v1_13::api::settings::v1alpha1::PodPreset), @@ -720,6 +746,7 @@ pub enum ReplaceNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -775,6 +802,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_preset( namespace: &str, optional: crate::v1_13::WatchOptional<'_>, @@ -796,12 +824,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodPresetResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -847,6 +877,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_preset_for_all_namespaces( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -865,12 +896,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodPresetForAllNamespacesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/storage/v1/mod.rs b/src/v1_13/api/storage/v1/mod.rs index 57aca76186..09616e1c54 100644 --- a/src/v1_13/api/storage/v1/mod.rs +++ b/src/v1_13/api/storage/v1/mod.rs @@ -1,59 +1,43 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - PatchVolumeAttachmentStatusResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReadVolumeAttachmentStatusOptional, ReadVolumeAttachmentStatusResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - ReplaceVolumeAttachmentStatusOptional, ReplaceVolumeAttachmentStatusResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentStatusResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentStatusOptional, ReadVolumeAttachmentStatusResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentStatusOptional, ReplaceVolumeAttachmentStatusResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_13/api/storage/v1/storage_class.rs b/src/v1_13/api/storage/v1/storage_class.rs index bb060262d9..461e1ffa08 100644 --- a/src/v1_13/api/storage/v1/storage_class.rs +++ b/src/v1_13/api/storage/v1/storage_class.rs @@ -46,6 +46,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_13::api::storage::v1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -79,6 +80,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -90,6 +92,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_13::api::storage::v1::StorageClass), @@ -98,6 +101,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -159,6 +163,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -179,6 +184,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -263,6 +271,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_13::api::storage::v1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -433,12 +447,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_13::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -518,6 +535,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -529,12 +547,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_13::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -582,6 +602,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_13::api::storage::v1::StorageClass, @@ -614,6 +635,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -623,6 +645,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_13::api::storage::v1::StorageClass), @@ -630,6 +653,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -681,6 +705,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -699,12 +724,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/storage/v1/volume_attachment.rs b/src/v1_13/api/storage/v1/volume_attachment.rs index 1306b79f8d..452a3d7061 100644 --- a/src/v1_13/api/storage/v1/volume_attachment.rs +++ b/src/v1_13/api/storage/v1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_13::api::storage::v1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -64,6 +65,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1::VolumeAttachment), @@ -83,6 +86,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -164,6 +169,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -338,12 +349,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -418,12 +432,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -471,6 +487,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment_status( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -498,12 +515,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentStatusResponse { Ok(crate::v1_13::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -549,6 +568,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -583,6 +603,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -645,6 +668,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment_status( name: &str, optional: ReadVolumeAttachmentStatusOptional<'_>, @@ -671,6 +695,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -678,12 +703,14 @@ pub struct ReadVolumeAttachmentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentStatusResponse { Ok(crate::v1_13::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -731,6 +758,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_13::api::storage::v1::VolumeAttachment, @@ -763,6 +791,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -772,6 +801,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1::VolumeAttachment), @@ -779,6 +809,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -834,6 +865,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment_status( name: &str, body: &crate::v1_13::api::storage::v1::VolumeAttachment, @@ -866,6 +898,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -875,6 +908,7 @@ pub struct ReplaceVolumeAttachmentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentStatusResponse { Ok(crate::v1_13::api::storage::v1::VolumeAttachment), @@ -882,6 +916,7 @@ pub enum ReplaceVolumeAttachmentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +968,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -951,12 +987,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/storage/v1alpha1/mod.rs b/src/v1_13/api/storage/v1alpha1/mod.rs index a5eefeed6c..4b5a7d41ec 100644 --- a/src/v1_13/api/storage/v1alpha1/mod.rs +++ b/src/v1_13/api/storage/v1alpha1/mod.rs @@ -1,38 +1,26 @@ mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_13/api/storage/v1alpha1/volume_attachment.rs b/src/v1_13/api/storage/v1alpha1/volume_attachment.rs index 1c8357bb6f..88d79b4f3b 100644 --- a/src/v1_13/api/storage/v1alpha1/volume_attachment.rs +++ b/src/v1_13/api/storage/v1alpha1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_13::api::storage::v1alpha1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -64,6 +65,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1alpha1::VolumeAttachment), @@ -83,6 +86,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -164,6 +169,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -338,12 +349,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1alpha1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -418,12 +432,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -503,6 +520,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -514,12 +532,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -567,6 +587,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_13::api::storage::v1alpha1::VolumeAttachment, @@ -599,6 +620,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -608,6 +630,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1alpha1::VolumeAttachment), @@ -615,6 +638,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -666,6 +690,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -684,12 +709,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/storage/v1beta1/mod.rs b/src/v1_13/api/storage/v1beta1/mod.rs index 68d636f0cb..bcaee085a0 100644 --- a/src/v1_13/api/storage/v1beta1/mod.rs +++ b/src/v1_13/api/storage/v1beta1/mod.rs @@ -1,56 +1,40 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_13/api/storage/v1beta1/storage_class.rs b/src/v1_13/api/storage/v1beta1/storage_class.rs index 9231c0fec1..c7fe671735 100644 --- a/src/v1_13/api/storage/v1beta1/storage_class.rs +++ b/src/v1_13/api/storage/v1beta1/storage_class.rs @@ -46,6 +46,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_13::api::storage::v1beta1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -79,6 +80,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -90,6 +92,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_13::api::storage::v1beta1::StorageClass), @@ -98,6 +101,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -159,6 +163,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -179,6 +184,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -263,6 +271,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_13::api::storage::v1beta1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -433,12 +447,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_13::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -518,6 +535,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -529,12 +547,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_13::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -582,6 +602,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_13::api::storage::v1beta1::StorageClass, @@ -614,6 +635,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -623,6 +645,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_13::api::storage::v1beta1::StorageClass), @@ -630,6 +653,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -681,6 +705,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -699,12 +724,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/api/storage/v1beta1/volume_attachment.rs b/src/v1_13/api/storage/v1beta1/volume_attachment.rs index 207a81969b..b61db3d0be 100644 --- a/src/v1_13/api/storage/v1beta1/volume_attachment.rs +++ b/src/v1_13/api/storage/v1beta1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_13::api::storage::v1beta1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -64,6 +65,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1beta1::VolumeAttachment), @@ -83,6 +86,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -164,6 +169,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -338,12 +349,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1beta1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -418,12 +432,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -503,6 +520,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -514,12 +532,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -567,6 +587,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_13::api::storage::v1beta1::VolumeAttachment, @@ -599,6 +620,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -608,6 +630,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_13::api::storage::v1beta1::VolumeAttachment), @@ -615,6 +638,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -666,6 +690,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -684,12 +709,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs b/src/v1_13/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs index e54ff69dd4..dd8c97c66c 100644 --- a/src/v1_13/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs +++ b/src/v1_13/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs @@ -28,6 +28,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_custom_resource_definition( body: &crate::v1_13::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, optional: CreateCustomResourceDefinitionOptional<'_>, @@ -61,6 +62,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCustomResourceDefinitionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCustomResourceDefinitionResponse { Ok(crate::v1_13::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -80,6 +83,7 @@ pub enum CreateCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CustomResourceDefinition { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_custom_resource_definition( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -161,6 +166,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_collection_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCustomResourceDefinitionResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -226,6 +233,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_custom_resource_definition( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -245,6 +253,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCustomResourceDefinitionResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -253,6 +262,7 @@ pub enum DeleteCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_custom_resource_definition( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::list_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCustomResourceDefinitionResponse { Ok(crate::v1_13::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinitionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionResponse { Ok(crate::v1_13::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition_status( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionStatusResponse { Ok(crate::v1_13::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition( name: &str, optional: ReadCustomResourceDefinitionOptional<'_>, @@ -580,6 +600,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -591,12 +612,14 @@ pub struct ReadCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionResponse { Ok(crate::v1_13::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition_status( name: &str, optional: ReadCustomResourceDefinitionStatusOptional<'_>, @@ -668,6 +692,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionStatusResponse { Ok(crate::v1_13::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition( name: &str, body: &crate::v1_13::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -760,6 +788,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -769,6 +798,7 @@ pub struct ReplaceCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionResponse { Ok(crate::v1_13::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -776,6 +806,7 @@ pub enum ReplaceCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -831,6 +862,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition_status( name: &str, body: &crate::v1_13::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -863,6 +895,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -872,6 +905,7 @@ pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionStatusResponse { Ok(crate::v1_13::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -879,6 +913,7 @@ pub enum ReplaceCustomResourceDefinitionStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -930,6 +965,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_custom_resource_definition( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -948,12 +984,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::watch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCustomResourceDefinitionResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs b/src/v1_13/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs index df135d45fe..3c0069e78d 100644 --- a/src/v1_13/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs +++ b/src/v1_13/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs @@ -1,116 +1,74 @@ mod custom_resource_column_definition; -pub use self::custom_resource_column_definition::{ - CustomResourceColumnDefinition, -}; +pub use self::custom_resource_column_definition::CustomResourceColumnDefinition; mod custom_resource_conversion; -pub use self::custom_resource_conversion::{ - CustomResourceConversion, -}; +pub use self::custom_resource_conversion::CustomResourceConversion; mod custom_resource_definition; -pub use self::custom_resource_definition::{ - CustomResourceDefinition, - CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse, - DeleteCollectionCustomResourceDefinitionResponse, - DeleteCustomResourceDefinitionResponse, - ListCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionStatusResponse, - ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse, - ReadCustomResourceDefinitionStatusOptional, ReadCustomResourceDefinitionStatusResponse, - ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse, - ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse, - WatchCustomResourceDefinitionResponse, -}; +pub use self::custom_resource_definition::CustomResourceDefinition; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCollectionCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::ListCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionStatusResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionStatusOptional, ReadCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::WatchCustomResourceDefinitionResponse; mod custom_resource_definition_condition; -pub use self::custom_resource_definition_condition::{ - CustomResourceDefinitionCondition, -}; +pub use self::custom_resource_definition_condition::CustomResourceDefinitionCondition; mod custom_resource_definition_list; -pub use self::custom_resource_definition_list::{ - CustomResourceDefinitionList, -}; +pub use self::custom_resource_definition_list::CustomResourceDefinitionList; mod custom_resource_definition_names; -pub use self::custom_resource_definition_names::{ - CustomResourceDefinitionNames, -}; +pub use self::custom_resource_definition_names::CustomResourceDefinitionNames; mod custom_resource_definition_spec; -pub use self::custom_resource_definition_spec::{ - CustomResourceDefinitionSpec, -}; +pub use self::custom_resource_definition_spec::CustomResourceDefinitionSpec; mod custom_resource_definition_status; -pub use self::custom_resource_definition_status::{ - CustomResourceDefinitionStatus, -}; +pub use self::custom_resource_definition_status::CustomResourceDefinitionStatus; mod custom_resource_definition_version; -pub use self::custom_resource_definition_version::{ - CustomResourceDefinitionVersion, -}; +pub use self::custom_resource_definition_version::CustomResourceDefinitionVersion; mod custom_resource_subresource_scale; -pub use self::custom_resource_subresource_scale::{ - CustomResourceSubresourceScale, -}; +pub use self::custom_resource_subresource_scale::CustomResourceSubresourceScale; mod custom_resource_subresource_status; -pub use self::custom_resource_subresource_status::{ - CustomResourceSubresourceStatus, -}; +pub use self::custom_resource_subresource_status::CustomResourceSubresourceStatus; mod custom_resource_subresources; -pub use self::custom_resource_subresources::{ - CustomResourceSubresources, -}; +pub use self::custom_resource_subresources::CustomResourceSubresources; mod custom_resource_validation; -pub use self::custom_resource_validation::{ - CustomResourceValidation, -}; +pub use self::custom_resource_validation::CustomResourceValidation; mod external_documentation; -pub use self::external_documentation::{ - ExternalDocumentation, -}; +pub use self::external_documentation::ExternalDocumentation; mod json; -pub use self::json::{ - JSON, -}; +pub use self::json::JSON; mod json_schema_props; -pub use self::json_schema_props::{ - JSONSchemaProps, -}; +pub use self::json_schema_props::JSONSchemaProps; mod json_schema_props_or_array; -pub use self::json_schema_props_or_array::{ - JSONSchemaPropsOrArray, -}; +pub use self::json_schema_props_or_array::JSONSchemaPropsOrArray; mod json_schema_props_or_bool; -pub use self::json_schema_props_or_bool::{ - JSONSchemaPropsOrBool, -}; +pub use self::json_schema_props_or_bool::JSONSchemaPropsOrBool; mod json_schema_props_or_string_array; -pub use self::json_schema_props_or_string_array::{ - JSONSchemaPropsOrStringArray, -}; +pub use self::json_schema_props_or_string_array::JSONSchemaPropsOrStringArray; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; diff --git a/src/v1_13/apimachinery/pkg/api/resource/mod.rs b/src/v1_13/apimachinery/pkg/api/resource/mod.rs index 352925b923..629eeca5bc 100644 --- a/src/v1_13/apimachinery/pkg/api/resource/mod.rs +++ b/src/v1_13/apimachinery/pkg/api/resource/mod.rs @@ -1,5 +1,3 @@ mod quantity; -pub use self::quantity::{ - Quantity, -}; +pub use self::quantity::Quantity; diff --git a/src/v1_13/apimachinery/pkg/apis/meta/v1/mod.rs b/src/v1_13/apimachinery/pkg/apis/meta/v1/mod.rs index 9654f201d6..2a0195df45 100644 --- a/src/v1_13/apimachinery/pkg/apis/meta/v1/mod.rs +++ b/src/v1_13/apimachinery/pkg/apis/meta/v1/mod.rs @@ -1,115 +1,69 @@ mod api_group; -pub use self::api_group::{ - APIGroup, -}; +pub use self::api_group::APIGroup; mod api_group_list; -pub use self::api_group_list::{ - APIGroupList, -}; +pub use self::api_group_list::APIGroupList; mod api_resource; -pub use self::api_resource::{ - APIResource, -}; +pub use self::api_resource::APIResource; mod api_resource_list; -pub use self::api_resource_list::{ - APIResourceList, -}; +pub use self::api_resource_list::APIResourceList; mod api_versions; -pub use self::api_versions::{ - APIVersions, -}; +pub use self::api_versions::APIVersions; mod delete_options; -pub use self::delete_options::{ - DeleteOptions, -}; +pub use self::delete_options::DeleteOptions; mod group_version_for_discovery; -pub use self::group_version_for_discovery::{ - GroupVersionForDiscovery, -}; +pub use self::group_version_for_discovery::GroupVersionForDiscovery; mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializers; -pub use self::initializers::{ - Initializers, -}; +pub use self::initializers::Initializers; mod label_selector; -pub use self::label_selector::{ - LabelSelector, -}; +pub use self::label_selector::LabelSelector; mod label_selector_requirement; -pub use self::label_selector_requirement::{ - LabelSelectorRequirement, -}; +pub use self::label_selector_requirement::LabelSelectorRequirement; mod list_meta; -pub use self::list_meta::{ - ListMeta, -}; +pub use self::list_meta::ListMeta; mod micro_time; -pub use self::micro_time::{ - MicroTime, -}; +pub use self::micro_time::MicroTime; mod object_meta; -pub use self::object_meta::{ - ObjectMeta, -}; +pub use self::object_meta::ObjectMeta; mod owner_reference; -pub use self::owner_reference::{ - OwnerReference, -}; +pub use self::owner_reference::OwnerReference; mod patch; -pub use self::patch::{ - Patch, -}; +pub use self::patch::Patch; mod preconditions; -pub use self::preconditions::{ - Preconditions, -}; +pub use self::preconditions::Preconditions; mod server_address_by_client_cidr; -pub use self::server_address_by_client_cidr::{ - ServerAddressByClientCIDR, -}; +pub use self::server_address_by_client_cidr::ServerAddressByClientCIDR; mod status; -pub use self::status::{ - Status, -}; +pub use self::status::Status; mod status_cause; -pub use self::status_cause::{ - StatusCause, -}; +pub use self::status_cause::StatusCause; mod status_details; -pub use self::status_details::{ - StatusDetails, -}; +pub use self::status_details::StatusDetails; mod time; -pub use self::time::{ - Time, -}; +pub use self::time::Time; mod watch_event; -pub use self::watch_event::{ - WatchEvent, -}; +pub use self::watch_event::WatchEvent; diff --git a/src/v1_13/apimachinery/pkg/runtime/mod.rs b/src/v1_13/apimachinery/pkg/runtime/mod.rs index 8614e1a158..eb2b8c0503 100644 --- a/src/v1_13/apimachinery/pkg/runtime/mod.rs +++ b/src/v1_13/apimachinery/pkg/runtime/mod.rs @@ -1,5 +1,3 @@ mod raw_extension; -pub use self::raw_extension::{ - RawExtension, -}; +pub use self::raw_extension::RawExtension; diff --git a/src/v1_13/apimachinery/pkg/util/intstr/mod.rs b/src/v1_13/apimachinery/pkg/util/intstr/mod.rs index 0d14f602e5..d3f7196121 100644 --- a/src/v1_13/apimachinery/pkg/util/intstr/mod.rs +++ b/src/v1_13/apimachinery/pkg/util/intstr/mod.rs @@ -1,5 +1,3 @@ mod int_or_string; -pub use self::int_or_string::{ - IntOrString, -}; +pub use self::int_or_string::IntOrString; diff --git a/src/v1_13/apimachinery/pkg/version/mod.rs b/src/v1_13/apimachinery/pkg/version/mod.rs index 540fa68d40..f125e577d1 100644 --- a/src/v1_13/apimachinery/pkg/version/mod.rs +++ b/src/v1_13/apimachinery/pkg/version/mod.rs @@ -1,5 +1,3 @@ mod info; -pub use self::info::{ - Info, -}; +pub use self::info::Info; diff --git a/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs b/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs index fbdd92d4e3..41ef880873 100644 --- a/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs +++ b/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -61,6 +62,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -80,6 +83,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -254,6 +262,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service_status( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceStatusResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -580,6 +600,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -591,12 +612,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service_status( name: &str, optional: ReadAPIServiceStatusOptional<'_>, @@ -668,6 +692,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceStatusResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -760,6 +788,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -769,6 +798,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -776,6 +806,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -831,6 +862,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -863,6 +895,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -872,6 +905,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -879,6 +913,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -930,6 +965,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -948,12 +984,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs b/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs index f3c577aa5e..d210366939 100644 --- a/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs +++ b/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs @@ -1,41 +1,29 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - PatchAPIServiceStatusResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceStatusResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs b/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs index 12dd681d80..b07572cd60 100644 --- a/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs +++ b/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -61,6 +62,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -80,6 +83,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_13::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_13::DeleteOptional<'_>, list_optional: crate::v1_13::ListOptional<'_>, @@ -254,6 +262,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_13::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service_status( name: &str, body: &crate::v1_13::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceStatusResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -580,6 +600,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -591,12 +612,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service_status( name: &str, optional: ReadAPIServiceStatusOptional<'_>, @@ -668,6 +692,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceStatusResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -760,6 +788,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -769,6 +798,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -776,6 +806,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -831,6 +862,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -863,6 +895,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -872,6 +905,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_13::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -879,6 +913,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -930,6 +965,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_13::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -948,12 +984,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs b/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs index f3c577aa5e..d210366939 100644 --- a/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs +++ b/src/v1_13/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs @@ -1,41 +1,29 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - PatchAPIServiceStatusResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceStatusResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_13/mod.rs b/src/v1_13/mod.rs index 57efd87cda..1aace3b49e 100644 --- a/src/v1_13/mod.rs +++ b/src/v1_13/mod.rs @@ -1,23 +1,15 @@ mod delete_optional; -pub use self::delete_optional::{ - DeleteOptional, -}; +pub use self::delete_optional::DeleteOptional; mod list_optional; -pub use self::list_optional::{ - ListOptional, -}; +pub use self::list_optional::ListOptional; mod patch_optional; -pub use self::patch_optional::{ - PatchOptional, -}; +pub use self::patch_optional::PatchOptional; mod watch_optional; -pub use self::watch_optional::{ - WatchOptional, -}; +pub use self::watch_optional::WatchOptional; pub mod api; @@ -32,6 +24,7 @@ pub mod kube_aggregator; /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAPIVersionsResponse`]`>` constructor, or [`GetAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/".to_owned(); @@ -45,12 +38,14 @@ pub fn get_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAPIVersionsResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroupList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -85,6 +80,7 @@ impl crate::Response for GetAPIVersionsResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationAPIGroupResponse`]`>` constructor, or [`GetAdmissionregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/".to_owned(); @@ -98,12 +94,14 @@ pub fn get_admissionregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +136,7 @@ impl crate::Response for GetAdmissionregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1alpha1/".to_owned(); @@ -151,12 +150,14 @@ pub fn get_admissionregistration_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1alpha1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -191,6 +192,7 @@ impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1beta1/".to_owned(); @@ -204,12 +206,14 @@ pub fn get_admissionregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +248,7 @@ impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsAPIGroupResponse`]`>` constructor, or [`GetApiextensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/".to_owned(); @@ -257,12 +262,14 @@ pub fn get_apiextensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +304,7 @@ impl crate::Response for GetApiextensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiextensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/v1beta1/".to_owned(); @@ -310,12 +318,14 @@ pub fn get_apiextensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +360,7 @@ impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationAPIGroupResponse`]`>` constructor, or [`GetApiregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/".to_owned(); @@ -363,12 +374,14 @@ pub fn get_apiregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -403,6 +416,7 @@ impl crate::Response for GetApiregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1/".to_owned(); @@ -416,12 +430,14 @@ pub fn get_apiregistration_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -456,6 +472,7 @@ impl crate::Response for GetApiregistrationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1beta1/".to_owned(); @@ -469,12 +486,14 @@ pub fn get_apiregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -509,6 +528,7 @@ impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsAPIGroupResponse`]`>` constructor, or [`GetAppsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/".to_owned(); @@ -522,12 +542,14 @@ pub fn get_apps_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +584,7 @@ impl crate::Response for GetAppsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1APIResourcesResponse`]`>` constructor, or [`GetAppsV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1/".to_owned(); @@ -575,12 +598,14 @@ pub fn get_apps_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -615,6 +640,7 @@ impl crate::Response for GetAppsV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta1APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta1/".to_owned(); @@ -628,12 +654,14 @@ pub fn get_apps_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +696,7 @@ impl crate::Response for GetAppsV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta2APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta2/".to_owned(); @@ -681,12 +710,14 @@ pub fn get_apps_v1beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta2APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -721,6 +752,7 @@ impl crate::Response for GetAppsV1beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuditregistrationAPIGroupResponse`]`>` constructor, or [`GetAuditregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_auditregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/auditregistration.k8s.io/".to_owned(); @@ -734,12 +766,14 @@ pub fn get_auditregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_auditregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuditregistrationAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuditregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +808,7 @@ impl crate::Response for GetAuditregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuditregistrationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetAuditregistrationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_auditregistration_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/auditregistration.k8s.io/v1alpha1/".to_owned(); @@ -787,12 +822,14 @@ pub fn get_auditregistration_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_auditregistration_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuditregistrationV1alpha1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuditregistrationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -827,6 +864,7 @@ impl crate::Response for GetAuditregistrationV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationAPIGroupResponse`]`>` constructor, or [`GetAuthenticationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/".to_owned(); @@ -840,12 +878,14 @@ pub fn get_authentication_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -880,6 +920,7 @@ impl crate::Response for GetAuthenticationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1/".to_owned(); @@ -893,12 +934,14 @@ pub fn get_authentication_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +976,7 @@ impl crate::Response for GetAuthenticationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1beta1/".to_owned(); @@ -946,12 +990,14 @@ pub fn get_authentication_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -986,6 +1032,7 @@ impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationAPIGroupResponse`]`>` constructor, or [`GetAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/".to_owned(); @@ -999,12 +1046,14 @@ pub fn get_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1039,6 +1088,7 @@ impl crate::Response for GetAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1/".to_owned(); @@ -1052,12 +1102,14 @@ pub fn get_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1092,6 +1144,7 @@ impl crate::Response for GetAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1beta1/".to_owned(); @@ -1105,12 +1158,14 @@ pub fn get_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1145,6 +1200,7 @@ impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingAPIGroupResponse`]`>` constructor, or [`GetAutoscalingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/".to_owned(); @@ -1158,12 +1214,14 @@ pub fn get_autoscaling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1198,6 +1256,7 @@ impl crate::Response for GetAutoscalingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v1/".to_owned(); @@ -1211,12 +1270,14 @@ pub fn get_autoscaling_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1251,6 +1312,7 @@ impl crate::Response for GetAutoscalingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta1/".to_owned(); @@ -1264,12 +1326,14 @@ pub fn get_autoscaling_v2beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1304,6 +1368,7 @@ impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta2APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta2/".to_owned(); @@ -1317,12 +1382,14 @@ pub fn get_autoscaling_v2beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta2APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1357,6 +1424,7 @@ impl crate::Response for GetAutoscalingV2beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchAPIGroupResponse`]`>` constructor, or [`GetBatchAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/".to_owned(); @@ -1370,12 +1438,14 @@ pub fn get_batch_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1410,6 +1480,7 @@ impl crate::Response for GetBatchAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1APIResourcesResponse`]`>` constructor, or [`GetBatchV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1/".to_owned(); @@ -1423,12 +1494,14 @@ pub fn get_batch_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1463,6 +1536,7 @@ impl crate::Response for GetBatchV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1beta1APIResourcesResponse`]`>` constructor, or [`GetBatchV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1beta1/".to_owned(); @@ -1476,12 +1550,14 @@ pub fn get_batch_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1516,6 +1592,7 @@ impl crate::Response for GetBatchV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV2alpha1APIResourcesResponse`]`>` constructor, or [`GetBatchV2alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v2alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v2alpha1/".to_owned(); @@ -1529,12 +1606,14 @@ pub fn get_batch_v2alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v2alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV2alpha1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV2alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1569,6 +1648,7 @@ impl crate::Response for GetBatchV2alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesAPIGroupResponse`]`>` constructor, or [`GetCertificatesAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/".to_owned(); @@ -1582,12 +1662,14 @@ pub fn get_certificates_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1622,6 +1704,7 @@ impl crate::Response for GetCertificatesAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesV1beta1APIResourcesResponse`]`>` constructor, or [`GetCertificatesV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/v1beta1/".to_owned(); @@ -1635,12 +1718,14 @@ pub fn get_certificates_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1675,6 +1760,7 @@ impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { /// get the code version /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCodeVersionResponse`]`>` constructor, or [`GetCodeVersionResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_code_version( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/version/".to_owned(); @@ -1688,12 +1774,14 @@ pub fn get_code_version( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_code_version`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCodeVersionResponse { Ok(crate::v1_13::apimachinery::pkg::version::Info), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCodeVersionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1728,6 +1816,7 @@ impl crate::Response for GetCodeVersionResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoordinationAPIGroupResponse`]`>` constructor, or [`GetCoordinationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_coordination_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/coordination.k8s.io/".to_owned(); @@ -1741,12 +1830,14 @@ pub fn get_coordination_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_coordination_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoordinationAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoordinationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1781,6 +1872,7 @@ impl crate::Response for GetCoordinationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoordinationV1beta1APIResourcesResponse`]`>` constructor, or [`GetCoordinationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_coordination_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/coordination.k8s.io/v1beta1/".to_owned(); @@ -1794,12 +1886,14 @@ pub fn get_coordination_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_coordination_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoordinationV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoordinationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1834,6 +1928,7 @@ impl crate::Response for GetCoordinationV1beta1APIResourcesResponse { /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreAPIVersionsResponse`]`>` constructor, or [`GetCoreAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/".to_owned(); @@ -1847,12 +1942,14 @@ pub fn get_core_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreAPIVersionsResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIVersions), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1887,6 +1984,7 @@ impl crate::Response for GetCoreAPIVersionsResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreV1APIResourcesResponse`]`>` constructor, or [`GetCoreV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/v1/".to_owned(); @@ -1900,12 +1998,14 @@ pub fn get_core_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreV1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1940,6 +2040,7 @@ impl crate::Response for GetCoreV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsAPIGroupResponse`]`>` constructor, or [`GetEventsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/".to_owned(); @@ -1953,12 +2054,14 @@ pub fn get_events_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1993,6 +2096,7 @@ impl crate::Response for GetEventsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsV1beta1APIResourcesResponse`]`>` constructor, or [`GetEventsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/v1beta1/".to_owned(); @@ -2006,12 +2110,14 @@ pub fn get_events_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2046,6 +2152,7 @@ impl crate::Response for GetEventsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsAPIGroupResponse`]`>` constructor, or [`GetExtensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/".to_owned(); @@ -2059,12 +2166,14 @@ pub fn get_extensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2099,6 +2208,7 @@ impl crate::Response for GetExtensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetExtensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/v1beta1/".to_owned(); @@ -2112,12 +2222,14 @@ pub fn get_extensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2152,6 +2264,7 @@ impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingAPIGroupResponse`]`>` constructor, or [`GetNetworkingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/".to_owned(); @@ -2165,12 +2278,14 @@ pub fn get_networking_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2205,6 +2320,7 @@ impl crate::Response for GetNetworkingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingV1APIResourcesResponse`]`>` constructor, or [`GetNetworkingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/v1/".to_owned(); @@ -2218,12 +2334,14 @@ pub fn get_networking_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingV1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2258,6 +2376,7 @@ impl crate::Response for GetNetworkingV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyAPIGroupResponse`]`>` constructor, or [`GetPolicyAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/".to_owned(); @@ -2271,12 +2390,14 @@ pub fn get_policy_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2311,6 +2432,7 @@ impl crate::Response for GetPolicyAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyV1beta1APIResourcesResponse`]`>` constructor, or [`GetPolicyV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/v1beta1/".to_owned(); @@ -2324,12 +2446,14 @@ pub fn get_policy_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2364,6 +2488,7 @@ impl crate::Response for GetPolicyV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationAPIGroupResponse`]`>` constructor, or [`GetRbacAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/".to_owned(); @@ -2377,12 +2502,14 @@ pub fn get_rbac_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2417,6 +2544,7 @@ impl crate::Response for GetRbacAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1/".to_owned(); @@ -2430,12 +2558,14 @@ pub fn get_rbac_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2470,6 +2600,7 @@ impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1alpha1/".to_owned(); @@ -2483,12 +2614,14 @@ pub fn get_rbac_authorization_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1alpha1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2523,6 +2656,7 @@ impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1beta1/".to_owned(); @@ -2536,12 +2670,14 @@ pub fn get_rbac_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2576,6 +2712,7 @@ impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingAPIGroupResponse`]`>` constructor, or [`GetSchedulingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/".to_owned(); @@ -2589,12 +2726,14 @@ pub fn get_scheduling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2629,6 +2768,7 @@ impl crate::Response for GetSchedulingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1alpha1/".to_owned(); @@ -2642,12 +2782,14 @@ pub fn get_scheduling_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1alpha1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2682,6 +2824,7 @@ impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1beta1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1beta1/".to_owned(); @@ -2695,12 +2838,14 @@ pub fn get_scheduling_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2735,6 +2880,7 @@ impl crate::Response for GetSchedulingV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsAPIGroupResponse`]`>` constructor, or [`GetSettingsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/".to_owned(); @@ -2748,12 +2894,14 @@ pub fn get_settings_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2788,6 +2936,7 @@ impl crate::Response for GetSettingsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSettingsV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/v1alpha1/".to_owned(); @@ -2801,12 +2950,14 @@ pub fn get_settings_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsV1alpha1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2841,6 +2992,7 @@ impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageAPIGroupResponse`]`>` constructor, or [`GetStorageAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/".to_owned(); @@ -2854,12 +3006,14 @@ pub fn get_storage_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageAPIGroupResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2894,6 +3048,7 @@ impl crate::Response for GetStorageAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1APIResourcesResponse`]`>` constructor, or [`GetStorageV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1/".to_owned(); @@ -2907,12 +3062,14 @@ pub fn get_storage_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2947,6 +3104,7 @@ impl crate::Response for GetStorageV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1alpha1APIResourcesResponse`]`>` constructor, or [`GetStorageV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1alpha1/".to_owned(); @@ -2960,12 +3118,14 @@ pub fn get_storage_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1alpha1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3000,6 +3160,7 @@ impl crate::Response for GetStorageV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1beta1APIResourcesResponse`]`>` constructor, or [`GetStorageV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1beta1/".to_owned(); @@ -3013,12 +3174,14 @@ pub fn get_storage_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1beta1APIResourcesResponse { Ok(crate::v1_13::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3057,6 +3220,7 @@ impl crate::Response for GetStorageV1beta1APIResourcesResponse { /// * `logpath` /// /// path to the log +#[cfg(feature = "api")] pub fn log_file_handler( logpath: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -3073,11 +3237,13 @@ pub fn log_file_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3102,6 +3268,7 @@ impl crate::Response for LogFileHandlerResponse { // Generated from operation logFileListHandler /// Use the returned [`crate::ResponseBody`]`<`[`LogFileListHandlerResponse`]`>` constructor, or [`LogFileListHandlerResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn log_file_list_handler( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/logs/".to_owned(); @@ -3115,11 +3282,13 @@ pub fn log_file_list_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_list_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileListHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileListHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/admissionregistration/v1beta1/mod.rs b/src/v1_14/api/admissionregistration/v1beta1/mod.rs index 9e4dd8f5a8..7dd5906135 100644 --- a/src/v1_14/api/admissionregistration/v1beta1/mod.rs +++ b/src/v1_14/api/admissionregistration/v1beta1/mod.rs @@ -1,56 +1,40 @@ mod mutating_webhook_configuration; -pub use self::mutating_webhook_configuration::{ - MutatingWebhookConfiguration, - CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse, - DeleteCollectionMutatingWebhookConfigurationResponse, - DeleteMutatingWebhookConfigurationResponse, - ListMutatingWebhookConfigurationResponse, - PatchMutatingWebhookConfigurationResponse, - ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse, - ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse, - WatchMutatingWebhookConfigurationResponse, -}; +pub use self::mutating_webhook_configuration::MutatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteCollectionMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::ListMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::PatchMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::WatchMutatingWebhookConfigurationResponse; mod mutating_webhook_configuration_list; -pub use self::mutating_webhook_configuration_list::{ - MutatingWebhookConfigurationList, -}; +pub use self::mutating_webhook_configuration_list::MutatingWebhookConfigurationList; mod rule_with_operations; -pub use self::rule_with_operations::{ - RuleWithOperations, -}; +pub use self::rule_with_operations::RuleWithOperations; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod validating_webhook_configuration; -pub use self::validating_webhook_configuration::{ - ValidatingWebhookConfiguration, - CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse, - DeleteCollectionValidatingWebhookConfigurationResponse, - DeleteValidatingWebhookConfigurationResponse, - ListValidatingWebhookConfigurationResponse, - PatchValidatingWebhookConfigurationResponse, - ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse, - ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse, - WatchValidatingWebhookConfigurationResponse, -}; +pub use self::validating_webhook_configuration::ValidatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteCollectionValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::ListValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::PatchValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::WatchValidatingWebhookConfigurationResponse; mod validating_webhook_configuration_list; -pub use self::validating_webhook_configuration_list::{ - ValidatingWebhookConfigurationList, -}; +pub use self::validating_webhook_configuration_list::ValidatingWebhookConfigurationList; mod webhook; -pub use self::webhook::{ - Webhook, -}; +pub use self::webhook::Webhook; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; diff --git a/src/v1_14/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs b/src/v1_14/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs index cab58e4691..31d2058c7f 100644 --- a/src/v1_14/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs +++ b/src/v1_14/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_mutating_webhook_configuration( body: &crate::v1_14::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, optional: CreateMutatingWebhookConfigurationOptional<'_>, @@ -59,6 +60,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateMutatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateMutatingWebhookConfigurationResponse { Ok(crate::v1_14::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -78,6 +81,7 @@ pub enum CreateMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl MutatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_mutating_webhook_configuration( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -159,6 +164,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_collection_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionMutatingWebhookConfigurationResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_mutating_webhook_configuration( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteMutatingWebhookConfigurationResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_mutating_webhook_configuration( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::list_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListMutatingWebhookConfigurationResponse { Ok(crate::v1_14::api::admissionregistration::v1beta1::MutatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_mutating_webhook_configuration( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::patch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchMutatingWebhookConfigurationResponse { Ok(crate::v1_14::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_mutating_webhook_configuration( name: &str, optional: ReadMutatingWebhookConfigurationOptional<'_>, @@ -498,6 +515,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadMutatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadMutatingWebhookConfigurationResponse { Ok(crate::v1_14::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_mutating_webhook_configuration( name: &str, body: &crate::v1_14::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, @@ -598,6 +619,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceMutatingWebhookConfigurationResponse { Ok(crate::v1_14::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -616,6 +639,7 @@ pub enum ReplaceMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_mutating_webhook_configuration( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::watch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchMutatingWebhookConfigurationResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/admissionregistration/v1beta1/validating_webhook_configuration.rs b/src/v1_14/api/admissionregistration/v1beta1/validating_webhook_configuration.rs index b3887db0e2..738b75497e 100644 --- a/src/v1_14/api/admissionregistration/v1beta1/validating_webhook_configuration.rs +++ b/src/v1_14/api/admissionregistration/v1beta1/validating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_validating_webhook_configuration( body: &crate::v1_14::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, optional: CreateValidatingWebhookConfigurationOptional<'_>, @@ -59,6 +60,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateValidatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateValidatingWebhookConfigurationResponse { Ok(crate::v1_14::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -78,6 +81,7 @@ pub enum CreateValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl ValidatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_validating_webhook_configuration( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -159,6 +164,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_collection_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionValidatingWebhookConfigurationResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_validating_webhook_configuration( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteValidatingWebhookConfigurationResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_validating_webhook_configuration( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::list_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListValidatingWebhookConfigurationResponse { Ok(crate::v1_14::api::admissionregistration::v1beta1::ValidatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_validating_webhook_configuration( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::patch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchValidatingWebhookConfigurationResponse { Ok(crate::v1_14::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_validating_webhook_configuration( name: &str, optional: ReadValidatingWebhookConfigurationOptional<'_>, @@ -498,6 +515,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadValidatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadValidatingWebhookConfigurationResponse { Ok(crate::v1_14::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_validating_webhook_configuration( name: &str, body: &crate::v1_14::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, @@ -598,6 +619,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceValidatingWebhookConfigurationResponse { Ok(crate::v1_14::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -616,6 +639,7 @@ pub enum ReplaceValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_validating_webhook_configuration( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::watch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchValidatingWebhookConfigurationResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1/controller_revision.rs b/src/v1_14/api/apps/v1/controller_revision.rs index 59aa320e17..e6af993036 100644 --- a/src/v1_14/api/apps/v1/controller_revision.rs +++ b/src/v1_14/api/apps/v1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_14::api::apps::v1::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -713,6 +737,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -724,6 +749,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1::ControllerRevision), @@ -731,6 +757,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -782,6 +809,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -800,12 +828,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -876,12 +907,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1/daemon_set.rs b/src/v1_14/api/apps/v1/daemon_set.rs index 2141edcb44..9e220d1739 100644 --- a/src/v1_14/api/apps/v1/daemon_set.rs +++ b/src/v1_14/api/apps/v1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_14::api::apps::v1::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_14::api::apps::v1::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_14::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_14::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_14::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_14::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_14::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_14::api::apps::v1::DaemonSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_14::api::apps::v1::DaemonSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1/deployment.rs b/src/v1_14/api/apps/v1/deployment.rs index 4ab38adfaa..b39b4bb06a 100644 --- a/src/v1_14/api/apps/v1/deployment.rs +++ b/src/v1_14/api/apps/v1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_14::api::apps::v1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1::Deployment), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::apps::v1::Deployment), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1/mod.rs b/src/v1_14/api/apps/v1/mod.rs index a25b916f02..971a3fb358 100644 --- a/src/v1_14/api/apps/v1/mod.rs +++ b/src/v1_14/api/apps/v1/mod.rs @@ -1,202 +1,146 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_14/api/apps/v1/replica_set.rs b/src/v1_14/api/apps/v1/replica_set.rs index 232b0d05c0..08a7a1ef9c 100644 --- a/src/v1_14/api/apps/v1/replica_set.rs +++ b/src/v1_14/api/apps/v1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_14::api::apps::v1::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_14::api::apps::v1::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_14::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_14::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_14::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_14::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_14::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_14::api::apps::v1::ReplicaSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_14::api::apps::v1::ReplicaSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1/stateful_set.rs b/src/v1_14/api/apps/v1/stateful_set.rs index 19c2fe3aad..cb018b34d6 100644 --- a/src/v1_14/api/apps/v1/stateful_set.rs +++ b/src/v1_14/api/apps/v1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_14::api::apps::v1::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_14::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_14::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -891,6 +922,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -902,6 +934,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1::StatefulSet), @@ -909,6 +942,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -968,6 +1002,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -1006,6 +1041,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1017,6 +1053,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_14::api::apps::v1::StatefulSet), @@ -1024,6 +1061,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1079,6 +1117,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1100,12 +1139,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1151,6 +1192,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1169,12 +1211,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1beta1/controller_revision.rs b/src/v1_14/api/apps/v1beta1/controller_revision.rs index 2fbb8c89ec..c2baddf5cc 100644 --- a/src/v1_14/api/apps/v1beta1/controller_revision.rs +++ b/src/v1_14/api/apps/v1beta1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_14::api::apps::v1beta1::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1beta1::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -713,6 +737,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -724,6 +749,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1beta1::ControllerRevision), @@ -731,6 +757,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -782,6 +809,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -800,12 +828,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -876,12 +907,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1beta1/deployment.rs b/src/v1_14/api/apps/v1beta1/deployment.rs index 53a24430b9..976dc40223 100644 --- a/src/v1_14/api/apps/v1beta1/deployment.rs +++ b/src/v1_14/api/apps/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_14::api::apps::v1beta1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1beta1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1beta1::Deployment), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::apps::v1beta1::Deployment), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1beta1/deployment_rollback.rs b/src/v1_14/api/apps/v1beta1/deployment_rollback.rs index 8a05577182..4834c12e85 100644 --- a/src/v1_14/api/apps/v1beta1/deployment_rollback.rs +++ b/src/v1_14/api/apps/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -75,6 +76,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -86,6 +88,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -94,6 +97,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1beta1/mod.rs b/src/v1_14/api/apps/v1beta1/mod.rs index 93facd2f47..94ca19493a 100644 --- a/src/v1_14/api/apps/v1beta1/mod.rs +++ b/src/v1_14/api/apps/v1beta1/mod.rs @@ -1,148 +1,106 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_14/api/apps/v1beta1/scale.rs b/src/v1_14/api/apps/v1beta1/scale.rs index 279814ae80..25dfe361ee 100644 --- a/src/v1_14/api/apps/v1beta1/scale.rs +++ b/src/v1_14/api/apps/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_14::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -207,6 +213,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -235,6 +242,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -242,12 +250,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -325,6 +336,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -332,12 +344,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_14::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +403,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -427,6 +442,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -438,6 +454,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::apps::v1beta1::Scale), @@ -445,6 +462,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -504,6 +522,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -542,6 +561,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -553,6 +573,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_14::api::apps::v1beta1::Scale), @@ -560,6 +581,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1beta1/stateful_set.rs b/src/v1_14/api/apps/v1beta1/stateful_set.rs index 20420c558a..32035e9474 100644 --- a/src/v1_14/api/apps/v1beta1/stateful_set.rs +++ b/src/v1_14/api/apps/v1beta1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_14::api::apps::v1beta1::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1beta1::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -891,6 +922,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -902,6 +934,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1beta1::StatefulSet), @@ -909,6 +942,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -968,6 +1002,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -1006,6 +1041,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1017,6 +1053,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta1::StatefulSet), @@ -1024,6 +1061,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1079,6 +1117,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1100,12 +1139,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1151,6 +1192,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1169,12 +1211,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1beta2/controller_revision.rs b/src/v1_14/api/apps/v1beta2/controller_revision.rs index 7a3b43b99d..ce98396720 100644 --- a/src/v1_14/api/apps/v1beta2/controller_revision.rs +++ b/src/v1_14/api/apps/v1beta2/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_14::api::apps::v1beta2::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1beta2::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -713,6 +737,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -724,6 +749,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_14::api::apps::v1beta2::ControllerRevision), @@ -731,6 +757,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -782,6 +809,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -800,12 +828,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -876,12 +907,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1beta2/daemon_set.rs b/src/v1_14/api/apps/v1beta2/daemon_set.rs index 0659ae7ba2..e154aa2014 100644 --- a/src/v1_14/api/apps/v1beta2/daemon_set.rs +++ b/src/v1_14/api/apps/v1beta2/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_14::api::apps::v1beta2::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_14::api::apps::v1beta2::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_14::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_14::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_14::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_14::api::apps::v1beta2::DaemonSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::DaemonSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1beta2/deployment.rs b/src/v1_14/api/apps/v1beta2/deployment.rs index b77d33a41d..2adb0eb567 100644 --- a/src/v1_14/api/apps/v1beta2/deployment.rs +++ b/src/v1_14/api/apps/v1beta2/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_14::api::apps::v1beta2::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1beta2::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_14::api::apps::v1beta2::Deployment), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::Deployment), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1beta2/mod.rs b/src/v1_14/api/apps/v1beta2/mod.rs index a95884f4d6..60c611aefd 100644 --- a/src/v1_14/api/apps/v1beta2/mod.rs +++ b/src/v1_14/api/apps/v1beta2/mod.rs @@ -1,226 +1,164 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_14/api/apps/v1beta2/replica_set.rs b/src/v1_14/api/apps/v1beta2/replica_set.rs index 79a08ecf16..cf9a11e84f 100644 --- a/src/v1_14/api/apps/v1beta2/replica_set.rs +++ b/src/v1_14/api/apps/v1beta2/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_14::api::apps::v1beta2::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_14::api::apps::v1beta2::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_14::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_14::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_14::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_14::api::apps::v1beta2::ReplicaSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::ReplicaSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1beta2/scale.rs b/src/v1_14/api/apps/v1beta2/scale.rs index c4773e6ce6..be5c4caaf1 100644 --- a/src/v1_14/api/apps/v1beta2/scale.rs +++ b/src/v1_14/api/apps/v1beta2/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_14::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_14::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_14::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_14::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -603,6 +625,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -614,6 +637,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::apps::v1beta2::Scale), @@ -621,6 +645,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -680,6 +705,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -718,6 +744,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -729,6 +756,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_14::api::apps::v1beta2::Scale), @@ -736,6 +764,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -795,6 +824,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -833,6 +863,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -844,6 +875,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_14::api::apps::v1beta2::Scale), @@ -851,6 +883,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/apps/v1beta2/stateful_set.rs b/src/v1_14/api/apps/v1beta2/stateful_set.rs index fc2871a8ad..c060e5b45b 100644 --- a/src/v1_14/api/apps/v1beta2/stateful_set.rs +++ b/src/v1_14/api/apps/v1beta2/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_14::api::apps::v1beta2::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1beta2::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_14::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -891,6 +922,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -902,6 +934,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_14::api::apps::v1beta2::StatefulSet), @@ -909,6 +942,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -968,6 +1002,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -1006,6 +1041,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1017,6 +1053,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_14::api::apps::v1beta2::StatefulSet), @@ -1024,6 +1061,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1079,6 +1117,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1100,12 +1139,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1151,6 +1192,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1169,12 +1211,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/auditregistration/v1alpha1/audit_sink.rs b/src/v1_14/api/auditregistration/v1alpha1/audit_sink.rs index 3794748b0e..a51ad0792b 100644 --- a/src/v1_14/api/auditregistration/v1alpha1/audit_sink.rs +++ b/src/v1_14/api/auditregistration/v1alpha1/audit_sink.rs @@ -25,6 +25,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_audit_sink( body: &crate::v1_14::api::auditregistration::v1alpha1::AuditSink, optional: CreateAuditSinkOptional<'_>, @@ -58,6 +59,7 @@ impl AuditSink { } /// Optional parameters of [`AuditSink::create_audit_sink`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAuditSinkOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -69,6 +71,7 @@ pub struct CreateAuditSinkOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::create_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAuditSinkResponse { Ok(crate::v1_14::api::auditregistration::v1alpha1::AuditSink), @@ -77,6 +80,7 @@ pub enum CreateAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_audit_sink( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -157,6 +162,7 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::delete_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAuditSinkResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -165,6 +171,7 @@ pub enum DeleteAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -231,6 +238,7 @@ impl AuditSink { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_audit_sink( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -251,6 +259,7 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::delete_collection_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAuditSinkResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteCollectionAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -314,6 +324,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_audit_sink( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -332,12 +343,14 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::list_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAuditSinkResponse { Ok(crate::v1_14::api::auditregistration::v1alpha1::AuditSinkList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -385,6 +398,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_audit_sink( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -412,12 +426,14 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::patch_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAuditSinkResponse { Ok(crate::v1_14::api::auditregistration::v1alpha1::AuditSink), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_audit_sink( name: &str, optional: ReadAuditSinkOptional<'_>, @@ -497,6 +514,7 @@ impl AuditSink { } /// Optional parameters of [`AuditSink::read_audit_sink`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAuditSinkOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -508,12 +526,14 @@ pub struct ReadAuditSinkOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::read_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAuditSinkResponse { Ok(crate::v1_14::api::auditregistration::v1alpha1::AuditSink), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -561,6 +581,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_audit_sink( name: &str, body: &crate::v1_14::api::auditregistration::v1alpha1::AuditSink, @@ -597,6 +618,7 @@ impl AuditSink { } /// Optional parameters of [`AuditSink::replace_audit_sink`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAuditSinkOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -608,6 +630,7 @@ pub struct ReplaceAuditSinkOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::replace_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAuditSinkResponse { Ok(crate::v1_14::api::auditregistration::v1alpha1::AuditSink), @@ -615,6 +638,7 @@ pub enum ReplaceAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -666,6 +690,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_audit_sink( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -684,12 +709,14 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::watch_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAuditSinkResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/auditregistration/v1alpha1/mod.rs b/src/v1_14/api/auditregistration/v1alpha1/mod.rs index 3db2282342..184bc96846 100644 --- a/src/v1_14/api/auditregistration/v1alpha1/mod.rs +++ b/src/v1_14/api/auditregistration/v1alpha1/mod.rs @@ -1,48 +1,32 @@ mod audit_sink; -pub use self::audit_sink::{ - AuditSink, - CreateAuditSinkOptional, CreateAuditSinkResponse, - DeleteAuditSinkResponse, - DeleteCollectionAuditSinkResponse, - ListAuditSinkResponse, - PatchAuditSinkResponse, - ReadAuditSinkOptional, ReadAuditSinkResponse, - ReplaceAuditSinkOptional, ReplaceAuditSinkResponse, - WatchAuditSinkResponse, -}; +pub use self::audit_sink::AuditSink; +#[cfg(feature = "api")] pub use self::audit_sink::{CreateAuditSinkOptional, CreateAuditSinkResponse}; +#[cfg(feature = "api")] pub use self::audit_sink::DeleteAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::DeleteCollectionAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::ListAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::PatchAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::{ReadAuditSinkOptional, ReadAuditSinkResponse}; +#[cfg(feature = "api")] pub use self::audit_sink::{ReplaceAuditSinkOptional, ReplaceAuditSinkResponse}; +#[cfg(feature = "api")] pub use self::audit_sink::WatchAuditSinkResponse; mod audit_sink_list; -pub use self::audit_sink_list::{ - AuditSinkList, -}; +pub use self::audit_sink_list::AuditSinkList; mod audit_sink_spec; -pub use self::audit_sink_spec::{ - AuditSinkSpec, -}; +pub use self::audit_sink_spec::AuditSinkSpec; mod policy; -pub use self::policy::{ - Policy, -}; +pub use self::policy::Policy; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod webhook; -pub use self::webhook::{ - Webhook, -}; +pub use self::webhook::Webhook; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; mod webhook_throttle_config; -pub use self::webhook_throttle_config::{ - WebhookThrottleConfig, -}; +pub use self::webhook_throttle_config::WebhookThrottleConfig; diff --git a/src/v1_14/api/authentication/v1/mod.rs b/src/v1_14/api/authentication/v1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_14/api/authentication/v1/mod.rs +++ b/src/v1_14/api/authentication/v1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_14/api/authentication/v1/token_review.rs b/src/v1_14/api/authentication/v1/token_review.rs index 0378363a8d..72acf5ca8f 100644 --- a/src/v1_14/api/authentication/v1/token_review.rs +++ b/src/v1_14/api/authentication/v1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_14::api::authentication::v1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -61,6 +62,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_14::api::authentication::v1::TokenReview), @@ -80,6 +83,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/authentication/v1beta1/mod.rs b/src/v1_14/api/authentication/v1beta1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_14/api/authentication/v1beta1/mod.rs +++ b/src/v1_14/api/authentication/v1beta1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_14/api/authentication/v1beta1/token_review.rs b/src/v1_14/api/authentication/v1beta1/token_review.rs index 795b53d89b..a62e4fbf22 100644 --- a/src/v1_14/api/authentication/v1beta1/token_review.rs +++ b/src/v1_14/api/authentication/v1beta1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_14::api::authentication::v1beta1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -61,6 +62,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_14::api::authentication::v1beta1::TokenReview), @@ -80,6 +83,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/authorization/v1/local_subject_access_review.rs b/src/v1_14/api/authorization/v1/local_subject_access_review.rs index 87562638f2..15ad6dd8e1 100644 --- a/src/v1_14/api/authorization/v1/local_subject_access_review.rs +++ b/src/v1_14/api/authorization/v1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_14::api::authorization::v1::LocalSubjectAccessReview, @@ -68,6 +69,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_14::api::authorization::v1::LocalSubjectAccessReview), @@ -87,6 +90,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/authorization/v1/mod.rs b/src/v1_14/api/authorization/v1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_14/api/authorization/v1/mod.rs +++ b/src/v1_14/api/authorization/v1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_14/api/authorization/v1/self_subject_access_review.rs b/src/v1_14/api/authorization/v1/self_subject_access_review.rs index 4a3e501c81..d814333a5f 100644 --- a/src/v1_14/api/authorization/v1/self_subject_access_review.rs +++ b/src/v1_14/api/authorization/v1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_14::api::authorization::v1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_14::api::authorization::v1::SelfSubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/authorization/v1/self_subject_rules_review.rs b/src/v1_14/api/authorization/v1/self_subject_rules_review.rs index a1b51d2e88..89553a78ba 100644 --- a/src/v1_14/api/authorization/v1/self_subject_rules_review.rs +++ b/src/v1_14/api/authorization/v1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_14::api::authorization::v1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_14::api::authorization::v1::SelfSubjectRulesReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/authorization/v1/subject_access_review.rs b/src/v1_14/api/authorization/v1/subject_access_review.rs index 10c6587113..47a79aa874 100644 --- a/src/v1_14/api/authorization/v1/subject_access_review.rs +++ b/src/v1_14/api/authorization/v1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_14::api::authorization::v1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_14::api::authorization::v1::SubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/authorization/v1beta1/local_subject_access_review.rs b/src/v1_14/api/authorization/v1beta1/local_subject_access_review.rs index 2327ef64db..b3bac1cdca 100644 --- a/src/v1_14/api/authorization/v1beta1/local_subject_access_review.rs +++ b/src/v1_14/api/authorization/v1beta1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_14::api::authorization::v1beta1::LocalSubjectAccessReview, @@ -68,6 +69,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_14::api::authorization::v1beta1::LocalSubjectAccessReview), @@ -87,6 +90,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/authorization/v1beta1/mod.rs b/src/v1_14/api/authorization/v1beta1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_14/api/authorization/v1beta1/mod.rs +++ b/src/v1_14/api/authorization/v1beta1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_14/api/authorization/v1beta1/self_subject_access_review.rs b/src/v1_14/api/authorization/v1beta1/self_subject_access_review.rs index 7450959fc1..36a2613510 100644 --- a/src/v1_14/api/authorization/v1beta1/self_subject_access_review.rs +++ b/src/v1_14/api/authorization/v1beta1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_14::api::authorization::v1beta1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_14::api::authorization::v1beta1::SelfSubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/authorization/v1beta1/self_subject_rules_review.rs b/src/v1_14/api/authorization/v1beta1/self_subject_rules_review.rs index 09fa23ebff..b5a3b79419 100644 --- a/src/v1_14/api/authorization/v1beta1/self_subject_rules_review.rs +++ b/src/v1_14/api/authorization/v1beta1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_14::api::authorization::v1beta1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_14::api::authorization::v1beta1::SelfSubjectRulesReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/authorization/v1beta1/subject_access_review.rs b/src/v1_14/api/authorization/v1beta1/subject_access_review.rs index 5cea16f0fe..d5d8eaabc6 100644 --- a/src/v1_14/api/authorization/v1beta1/subject_access_review.rs +++ b/src/v1_14/api/authorization/v1beta1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_14::api::authorization::v1beta1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_14::api::authorization::v1beta1::SubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/autoscaling/v1/horizontal_pod_autoscaler.rs b/src/v1_14/api/autoscaling/v1/horizontal_pod_autoscaler.rs index ba6fa0278e..ba59e8a00a 100644 --- a/src/v1_14/api/autoscaling/v1/horizontal_pod_autoscaler.rs +++ b/src/v1_14/api/autoscaling/v1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_14::api::autoscaling::v1::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_14::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_14::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_14::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_14::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/autoscaling/v1/mod.rs b/src/v1_14/api/autoscaling/v1/mod.rs index a4f7a0312d..09ed1f1487 100644 --- a/src/v1_14/api/autoscaling/v1/mod.rs +++ b/src/v1_14/api/autoscaling/v1/mod.rs @@ -1,65 +1,49 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - PatchNamespacedReplicationControllerScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, - ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; diff --git a/src/v1_14/api/autoscaling/v1/scale.rs b/src/v1_14/api/autoscaling/v1/scale.rs index 3a5268f57f..6b5be3253e 100644 --- a/src/v1_14/api/autoscaling/v1/scale.rs +++ b/src/v1_14/api/autoscaling/v1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -295,6 +304,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -324,12 +334,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -379,6 +391,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -407,6 +420,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -414,12 +428,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -497,6 +514,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -504,12 +522,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -559,6 +579,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -587,6 +608,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -594,12 +616,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -649,6 +673,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -677,6 +702,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -684,12 +710,14 @@ pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +769,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -779,6 +808,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -790,6 +820,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), @@ -797,6 +828,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -856,6 +888,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -894,6 +927,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -905,6 +939,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), @@ -912,6 +947,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -971,6 +1007,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -1009,6 +1046,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1020,6 +1058,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), @@ -1027,6 +1066,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1086,6 +1126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -1124,6 +1165,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1135,6 +1177,7 @@ pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerScaleResponse { Ok(crate::v1_14::api::autoscaling::v1::Scale), @@ -1142,6 +1185,7 @@ pub enum ReplaceNamespacedReplicationControllerScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs b/src/v1_14/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs index 55a4006dc2..e05ad59225 100644 --- a/src/v1_14/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs +++ b/src/v1_14/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_14::api::autoscaling::v2beta1::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_14::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_14::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_14::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_14::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/autoscaling/v2beta1/mod.rs b/src/v1_14/api/autoscaling/v2beta1/mod.rs index edb3c1e242..83788a8cb3 100644 --- a/src/v1_14/api/autoscaling/v2beta1/mod.rs +++ b/src/v1_14/api/autoscaling/v2beta1/mod.rs @@ -1,93 +1,61 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod external_metric_source; -pub use self::external_metric_source::{ - ExternalMetricSource, -}; +pub use self::external_metric_source::ExternalMetricSource; mod external_metric_status; -pub use self::external_metric_status::{ - ExternalMetricStatus, -}; +pub use self::external_metric_status::ExternalMetricStatus; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_14/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs b/src/v1_14/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs index 9b1e35733c..35792e7508 100644 --- a/src/v1_14/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs +++ b/src/v1_14/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_14::api::autoscaling::v2beta2::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_14::api::autoscaling::v2beta2::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v2beta2::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_14::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_14::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_14::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/autoscaling/v2beta2/mod.rs b/src/v1_14/api/autoscaling/v2beta2/mod.rs index 5823acde4f..2de8195cc9 100644 --- a/src/v1_14/api/autoscaling/v2beta2/mod.rs +++ b/src/v1_14/api/autoscaling/v2beta2/mod.rs @@ -1,108 +1,70 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod external_metric_source; -pub use self::external_metric_source::{ - ExternalMetricSource, -}; +pub use self::external_metric_source::ExternalMetricSource; mod external_metric_status; -pub use self::external_metric_status::{ - ExternalMetricStatus, -}; +pub use self::external_metric_status::ExternalMetricStatus; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_identifier; -pub use self::metric_identifier::{ - MetricIdentifier, -}; +pub use self::metric_identifier::MetricIdentifier; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod metric_target; -pub use self::metric_target::{ - MetricTarget, -}; +pub use self::metric_target::MetricTarget; mod metric_value_status; -pub use self::metric_value_status::{ - MetricValueStatus, -}; +pub use self::metric_value_status::MetricValueStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_14/api/batch/v1/job.rs b/src/v1_14/api/batch/v1/job.rs index 621f2323ea..b784ae9e52 100644 --- a/src/v1_14/api/batch/v1/job.rs +++ b/src/v1_14/api/batch/v1/job.rs @@ -33,6 +33,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_job( namespace: &str, body: &crate::v1_14::api::batch::v1::Job, @@ -69,6 +70,7 @@ impl Job { } /// Optional parameters of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedJobResponse { Ok(crate::v1_14::api::batch::v1::Job), @@ -88,6 +91,7 @@ pub enum CreateNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Job { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_job( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_collection_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedJobResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedJobResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_job_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListJobForAllNamespacesResponse { Ok(crate::v1_14::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_job( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedJobResponse { Ok(crate::v1_14::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobResponse { Ok(crate::v1_14::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobStatusResponse { Ok(crate::v1_14::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobResponse { Ok(crate::v1_14::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobStatusResponse { Ok(crate::v1_14::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobResponse { Ok(crate::v1_14::api::batch::v1::Job), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobStatusResponse { Ok(crate::v1_14::api::batch::v1::Job), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_job_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchJobForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_job( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedJobResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/batch/v1/mod.rs b/src/v1_14/api/batch/v1/mod.rs index 68e7a18867..97d7bccb74 100644 --- a/src/v1_14/api/batch/v1/mod.rs +++ b/src/v1_14/api/batch/v1/mod.rs @@ -1,38 +1,28 @@ mod job; -pub use self::job::{ - Job, - CreateNamespacedJobOptional, CreateNamespacedJobResponse, - DeleteCollectionNamespacedJobResponse, - DeleteNamespacedJobResponse, - ListJobForAllNamespacesResponse, - ListNamespacedJobResponse, - PatchNamespacedJobResponse, - PatchNamespacedJobStatusResponse, - ReadNamespacedJobOptional, ReadNamespacedJobResponse, - ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse, - ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse, - ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse, - WatchJobForAllNamespacesResponse, - WatchNamespacedJobResponse, -}; +pub use self::job::Job; +#[cfg(feature = "api")] pub use self::job::{CreateNamespacedJobOptional, CreateNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::DeleteCollectionNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::DeleteNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::ListJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::ListNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobStatusResponse; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobOptional, ReadNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::WatchJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::WatchNamespacedJobResponse; mod job_condition; -pub use self::job_condition::{ - JobCondition, -}; +pub use self::job_condition::JobCondition; mod job_list; -pub use self::job_list::{ - JobList, -}; +pub use self::job_list::JobList; mod job_spec; -pub use self::job_spec::{ - JobSpec, -}; +pub use self::job_spec::JobSpec; mod job_status; -pub use self::job_status::{ - JobStatus, -}; +pub use self::job_status::JobStatus; diff --git a/src/v1_14/api/batch/v1beta1/cron_job.rs b/src/v1_14/api/batch/v1beta1/cron_job.rs index 3730b276d5..257ee34766 100644 --- a/src/v1_14/api/batch/v1beta1/cron_job.rs +++ b/src/v1_14/api/batch/v1beta1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_14::api::batch::v1beta1::CronJob, @@ -69,6 +70,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_14::api::batch::v1beta1::CronJob), @@ -88,6 +91,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_14::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_14::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_14::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_14::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_14::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_14::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_14::api::batch::v1beta1::CronJob), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_14::api::batch::v1beta1::CronJob), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/batch/v1beta1/mod.rs b/src/v1_14/api/batch/v1beta1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_14/api/batch/v1beta1/mod.rs +++ b/src/v1_14/api/batch/v1beta1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_14/api/batch/v2alpha1/cron_job.rs b/src/v1_14/api/batch/v2alpha1/cron_job.rs index f58c24b414..6ddeb620e7 100644 --- a/src/v1_14/api/batch/v2alpha1/cron_job.rs +++ b/src/v1_14/api/batch/v2alpha1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_14::api::batch::v2alpha1::CronJob, @@ -69,6 +70,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_14::api::batch::v2alpha1::CronJob), @@ -88,6 +91,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_14::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_14::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_14::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_14::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_14::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_14::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_14::api::batch::v2alpha1::CronJob), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_14::api::batch::v2alpha1::CronJob), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/batch/v2alpha1/mod.rs b/src/v1_14/api/batch/v2alpha1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_14/api/batch/v2alpha1/mod.rs +++ b/src/v1_14/api/batch/v2alpha1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_14/api/certificates/v1beta1/certificate_signing_request.rs b/src/v1_14/api/certificates/v1beta1/certificate_signing_request.rs index 6087ebfb54..610416d440 100644 --- a/src/v1_14/api/certificates/v1beta1/certificate_signing_request.rs +++ b/src/v1_14/api/certificates/v1beta1/certificate_signing_request.rs @@ -28,6 +28,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_certificate_signing_request( body: &crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest, optional: CreateCertificateSigningRequestOptional<'_>, @@ -61,6 +62,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCertificateSigningRequestOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCertificateSigningRequestResponse { Ok(crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest), @@ -80,6 +83,7 @@ pub enum CreateCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_certificate_signing_request( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCertificateSigningRequestResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl CertificateSigningRequest { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_certificate_signing_request( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -254,6 +262,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_collection_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCertificateSigningRequestResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_certificate_signing_request( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::list_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCertificateSigningRequestResponse { Ok(crate::v1_14::api::certificates::v1beta1::CertificateSigningRequestList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestResponse { Ok(crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request_status( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestStatusResponse { Ok(crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request( name: &str, optional: ReadCertificateSigningRequestOptional<'_>, @@ -580,6 +600,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -591,12 +612,14 @@ pub struct ReadCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestResponse { Ok(crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request_status( name: &str, optional: ReadCertificateSigningRequestStatusOptional<'_>, @@ -668,6 +692,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestStatusResponse { Ok(crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request( name: &str, body: &crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest, @@ -764,6 +792,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -775,6 +804,7 @@ pub struct ReplaceCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestResponse { Ok(crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest), @@ -782,6 +812,7 @@ pub enum ReplaceCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +868,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_approval( name: &str, body: &crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest, @@ -873,6 +905,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -884,6 +917,7 @@ pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestApprovalResponse { Ok(crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest), @@ -891,6 +925,7 @@ pub enum ReplaceCertificateSigningRequestApprovalResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestApprovalResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -946,6 +981,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_status( name: &str, body: &crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest, @@ -982,6 +1018,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -993,6 +1030,7 @@ pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestStatusResponse { Ok(crate::v1_14::api::certificates::v1beta1::CertificateSigningRequest), @@ -1000,6 +1038,7 @@ pub enum ReplaceCertificateSigningRequestStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1051,6 +1090,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_certificate_signing_request( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1069,12 +1109,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::watch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCertificateSigningRequestResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/certificates/v1beta1/mod.rs b/src/v1_14/api/certificates/v1beta1/mod.rs index 48cb9add17..bb9e9e4c0a 100644 --- a/src/v1_14/api/certificates/v1beta1/mod.rs +++ b/src/v1_14/api/certificates/v1beta1/mod.rs @@ -1,37 +1,27 @@ mod certificate_signing_request; -pub use self::certificate_signing_request::{ - CertificateSigningRequest, - CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse, - DeleteCertificateSigningRequestResponse, - DeleteCollectionCertificateSigningRequestResponse, - ListCertificateSigningRequestResponse, - PatchCertificateSigningRequestResponse, - PatchCertificateSigningRequestStatusResponse, - ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse, - ReadCertificateSigningRequestStatusOptional, ReadCertificateSigningRequestStatusResponse, - ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse, - ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse, - ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse, - WatchCertificateSigningRequestResponse, -}; +pub use self::certificate_signing_request::CertificateSigningRequest; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCollectionCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::ListCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestStatusResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestStatusOptional, ReadCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::WatchCertificateSigningRequestResponse; mod certificate_signing_request_condition; -pub use self::certificate_signing_request_condition::{ - CertificateSigningRequestCondition, -}; +pub use self::certificate_signing_request_condition::CertificateSigningRequestCondition; mod certificate_signing_request_list; -pub use self::certificate_signing_request_list::{ - CertificateSigningRequestList, -}; +pub use self::certificate_signing_request_list::CertificateSigningRequestList; mod certificate_signing_request_spec; -pub use self::certificate_signing_request_spec::{ - CertificateSigningRequestSpec, -}; +pub use self::certificate_signing_request_spec::CertificateSigningRequestSpec; mod certificate_signing_request_status; -pub use self::certificate_signing_request_status::{ - CertificateSigningRequestStatus, -}; +pub use self::certificate_signing_request_status::CertificateSigningRequestStatus; diff --git a/src/v1_14/api/coordination/v1/lease.rs b/src/v1_14/api/coordination/v1/lease.rs index d8619ee782..1c4c5f5249 100644 --- a/src/v1_14/api/coordination/v1/lease.rs +++ b/src/v1_14/api/coordination/v1/lease.rs @@ -30,6 +30,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_lease( namespace: &str, body: &crate::v1_14::api::coordination::v1::Lease, @@ -66,6 +67,7 @@ impl Lease { } /// Optional parameters of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLeaseResponse { Ok(crate::v1_14::api::coordination::v1::Lease), @@ -85,6 +88,7 @@ pub enum CreateNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Lease { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_lease( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_collection_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLeaseResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_lease( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLeaseResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_lease_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLeaseForAllNamespacesResponse { Ok(crate::v1_14::api::coordination::v1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_lease( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -427,12 +441,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLeaseResponse { Ok(crate::v1_14::api::coordination::v1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_lease( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::patch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLeaseResponse { Ok(crate::v1_14::api::coordination::v1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_lease( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl Lease { } /// Optional parameters of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLeaseOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLeaseResponse { Ok(crate::v1_14::api::coordination::v1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_lease( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl Lease { } /// Optional parameters of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLeaseResponse { Ok(crate::v1_14::api::coordination::v1::Lease), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -779,6 +806,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_lease_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -797,12 +825,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLeaseForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -852,6 +882,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_lease( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -873,12 +904,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLeaseResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/coordination/v1/mod.rs b/src/v1_14/api/coordination/v1/mod.rs index 5c3207ad2d..ff1ce80627 100644 --- a/src/v1_14/api/coordination/v1/mod.rs +++ b/src/v1_14/api/coordination/v1/mod.rs @@ -1,25 +1,19 @@ mod lease; -pub use self::lease::{ - Lease, - CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse, - DeleteCollectionNamespacedLeaseResponse, - DeleteNamespacedLeaseResponse, - ListLeaseForAllNamespacesResponse, - ListNamespacedLeaseResponse, - PatchNamespacedLeaseResponse, - ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse, - ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse, - WatchLeaseForAllNamespacesResponse, - WatchNamespacedLeaseResponse, -}; +pub use self::lease::Lease; +#[cfg(feature = "api")] pub use self::lease::{CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::DeleteCollectionNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::DeleteNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::ListLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::ListNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::PatchNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::{ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::{ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::WatchLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::WatchNamespacedLeaseResponse; mod lease_list; -pub use self::lease_list::{ - LeaseList, -}; +pub use self::lease_list::LeaseList; mod lease_spec; -pub use self::lease_spec::{ - LeaseSpec, -}; +pub use self::lease_spec::LeaseSpec; diff --git a/src/v1_14/api/coordination/v1beta1/lease.rs b/src/v1_14/api/coordination/v1beta1/lease.rs index 86b9535a7e..102765b151 100644 --- a/src/v1_14/api/coordination/v1beta1/lease.rs +++ b/src/v1_14/api/coordination/v1beta1/lease.rs @@ -30,6 +30,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_lease( namespace: &str, body: &crate::v1_14::api::coordination::v1beta1::Lease, @@ -66,6 +67,7 @@ impl Lease { } /// Optional parameters of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLeaseResponse { Ok(crate::v1_14::api::coordination::v1beta1::Lease), @@ -85,6 +88,7 @@ pub enum CreateNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Lease { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_lease( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_collection_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLeaseResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_lease( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLeaseResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_lease_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLeaseForAllNamespacesResponse { Ok(crate::v1_14::api::coordination::v1beta1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_lease( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -427,12 +441,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLeaseResponse { Ok(crate::v1_14::api::coordination::v1beta1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_lease( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::patch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLeaseResponse { Ok(crate::v1_14::api::coordination::v1beta1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_lease( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl Lease { } /// Optional parameters of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLeaseOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLeaseResponse { Ok(crate::v1_14::api::coordination::v1beta1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_lease( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl Lease { } /// Optional parameters of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLeaseResponse { Ok(crate::v1_14::api::coordination::v1beta1::Lease), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -779,6 +806,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_lease_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -797,12 +825,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLeaseForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -852,6 +882,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_lease( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -873,12 +904,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLeaseResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/coordination/v1beta1/mod.rs b/src/v1_14/api/coordination/v1beta1/mod.rs index 5c3207ad2d..ff1ce80627 100644 --- a/src/v1_14/api/coordination/v1beta1/mod.rs +++ b/src/v1_14/api/coordination/v1beta1/mod.rs @@ -1,25 +1,19 @@ mod lease; -pub use self::lease::{ - Lease, - CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse, - DeleteCollectionNamespacedLeaseResponse, - DeleteNamespacedLeaseResponse, - ListLeaseForAllNamespacesResponse, - ListNamespacedLeaseResponse, - PatchNamespacedLeaseResponse, - ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse, - ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse, - WatchLeaseForAllNamespacesResponse, - WatchNamespacedLeaseResponse, -}; +pub use self::lease::Lease; +#[cfg(feature = "api")] pub use self::lease::{CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::DeleteCollectionNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::DeleteNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::ListLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::ListNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::PatchNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::{ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::{ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::WatchLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::WatchNamespacedLeaseResponse; mod lease_list; -pub use self::lease_list::{ - LeaseList, -}; +pub use self::lease_list::LeaseList; mod lease_spec; -pub use self::lease_spec::{ - LeaseSpec, -}; +pub use self::lease_spec::LeaseSpec; diff --git a/src/v1_14/api/core/v1/binding.rs b/src/v1_14/api/core/v1/binding.rs index 0b125b96e8..755ae882af 100644 --- a/src/v1_14/api/core/v1/binding.rs +++ b/src/v1_14/api/core/v1/binding.rs @@ -30,6 +30,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_binding( namespace: &str, body: &crate::v1_14::api::core::v1::Binding, @@ -66,6 +67,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedBindingResponse { Ok(crate::v1_14::api::core::v1::Binding), @@ -85,6 +88,7 @@ pub enum CreateNamespacedBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -152,6 +156,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_binding( name: &str, namespace: &str, @@ -190,6 +195,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -201,6 +207,7 @@ pub struct CreateNamespacedPodBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodBindingResponse { Ok(crate::v1_14::api::core::v1::Binding), @@ -209,6 +216,7 @@ pub enum CreateNamespacedPodBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/component_status.rs b/src/v1_14/api/core/v1/component_status.rs index 0d0743ed99..b3535ca3d8 100644 --- a/src/v1_14/api/core/v1/component_status.rs +++ b/src/v1_14/api/core/v1/component_status.rs @@ -26,6 +26,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_component_status( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -44,12 +45,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::list_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListComponentStatusResponse { Ok(crate::v1_14::api::core::v1::ComponentStatusList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -95,6 +98,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_component_status( name: &str, optional: ReadComponentStatusOptional<'_>, @@ -121,6 +125,7 @@ impl ComponentStatus { } /// Optional parameters of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadComponentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -128,12 +133,14 @@ pub struct ReadComponentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadComponentStatusResponse { Ok(crate::v1_14::api::core::v1::ComponentStatus), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -177,6 +184,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_component_status( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -195,12 +203,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::watch_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchComponentStatusResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/config_map.rs b/src/v1_14/api/core/v1/config_map.rs index 2958037dfc..4f0ec14a37 100644 --- a/src/v1_14/api/core/v1/config_map.rs +++ b/src/v1_14/api/core/v1/config_map.rs @@ -33,6 +33,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_config_map( namespace: &str, body: &crate::v1_14::api::core::v1::ConfigMap, @@ -69,6 +70,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedConfigMapOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedConfigMapResponse { Ok(crate::v1_14::api::core::v1::ConfigMap), @@ -88,6 +91,7 @@ pub enum CreateNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ConfigMap { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_config_map( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_collection_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedConfigMapResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_config_map( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedConfigMapResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_config_map_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListConfigMapForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_config_map( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedConfigMapResponse { Ok(crate::v1_14::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_config_map( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::patch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedConfigMapResponse { Ok(crate::v1_14::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_config_map( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedConfigMapOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -618,12 +639,14 @@ pub struct ReadNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedConfigMapResponse { Ok(crate::v1_14::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_config_map( name: &str, namespace: &str, @@ -713,6 +737,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedConfigMapOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -724,6 +749,7 @@ pub struct ReplaceNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedConfigMapResponse { Ok(crate::v1_14::api::core::v1::ConfigMap), @@ -731,6 +757,7 @@ pub enum ReplaceNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -782,6 +809,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_config_map_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -800,12 +828,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchConfigMapForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_config_map( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -876,12 +907,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedConfigMapResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/endpoints.rs b/src/v1_14/api/core/v1/endpoints.rs index 3c294b4d4b..6cc16b92bf 100644 --- a/src/v1_14/api/core/v1/endpoints.rs +++ b/src/v1_14/api/core/v1/endpoints.rs @@ -41,6 +41,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_endpoints( namespace: &str, body: &crate::v1_14::api::core::v1::Endpoints, @@ -77,6 +78,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEndpointsOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -88,6 +90,7 @@ pub struct CreateNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEndpointsResponse { Ok(crate::v1_14::api::core::v1::Endpoints), @@ -96,6 +99,7 @@ pub enum CreateNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -161,6 +165,7 @@ impl Endpoints { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_endpoints( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -184,6 +189,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_collection_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEndpointsResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -191,6 +197,7 @@ pub enum DeleteCollectionNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -253,6 +260,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_endpoints( name: &str, namespace: &str, @@ -274,6 +282,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEndpointsResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -282,6 +291,7 @@ pub enum DeleteNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -346,6 +356,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_endpoints_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -364,12 +375,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEndpointsForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -417,6 +430,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_endpoints( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -438,12 +452,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEndpointsResponse { Ok(crate::v1_14::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -495,6 +511,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_endpoints( name: &str, namespace: &str, @@ -524,12 +541,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::patch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEndpointsResponse { Ok(crate::v1_14::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -579,6 +598,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_endpoints( name: &str, namespace: &str, @@ -615,6 +635,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEndpointsOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -626,12 +647,14 @@ pub struct ReadNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEndpointsResponse { Ok(crate::v1_14::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -683,6 +706,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_endpoints( name: &str, namespace: &str, @@ -721,6 +745,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEndpointsOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -732,6 +757,7 @@ pub struct ReplaceNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEndpointsResponse { Ok(crate::v1_14::api::core::v1::Endpoints), @@ -739,6 +765,7 @@ pub enum ReplaceNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -790,6 +817,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_endpoints_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -808,12 +836,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEndpointsForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -863,6 +893,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_endpoints( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -884,12 +915,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEndpointsResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/event.rs b/src/v1_14/api/core/v1/event.rs index 2f068bd51c..edd6d4f89b 100644 --- a/src/v1_14/api/core/v1/event.rs +++ b/src/v1_14/api/core/v1/event.rs @@ -69,6 +69,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_14::api::core::v1::Event, @@ -105,6 +106,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -116,6 +118,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_14::api::core::v1::Event), @@ -124,6 +127,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -189,6 +193,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -212,6 +217,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -219,6 +225,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -281,6 +288,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -302,6 +310,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -310,6 +319,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -374,6 +384,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -392,12 +403,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +458,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -466,12 +480,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_14::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -523,6 +539,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -552,12 +569,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_14::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -607,6 +626,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -643,6 +663,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -654,12 +675,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_14::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -711,6 +734,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -749,6 +773,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -760,6 +785,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_14::api::core::v1::Event), @@ -767,6 +793,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -818,6 +845,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -836,12 +864,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -891,6 +921,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -912,12 +943,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/limit_range.rs b/src/v1_14/api/core/v1/limit_range.rs index b98245adce..b8a9e17df7 100644 --- a/src/v1_14/api/core/v1/limit_range.rs +++ b/src/v1_14/api/core/v1/limit_range.rs @@ -30,6 +30,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_limit_range( namespace: &str, body: &crate::v1_14::api::core::v1::LimitRange, @@ -66,6 +67,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLimitRangeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLimitRangeResponse { Ok(crate::v1_14::api::core::v1::LimitRange), @@ -85,6 +88,7 @@ pub enum CreateNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl LimitRange { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_limit_range( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_collection_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLimitRangeResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_limit_range( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLimitRangeResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_limit_range_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLimitRangeForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_limit_range( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -427,12 +441,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLimitRangeResponse { Ok(crate::v1_14::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_limit_range( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::patch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLimitRangeResponse { Ok(crate::v1_14::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_limit_range( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLimitRangeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLimitRangeResponse { Ok(crate::v1_14::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_limit_range( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLimitRangeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLimitRangeResponse { Ok(crate::v1_14::api::core::v1::LimitRange), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -779,6 +806,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_limit_range_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -797,12 +825,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLimitRangeForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -852,6 +882,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_limit_range( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -873,12 +904,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLimitRangeResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/mod.rs b/src/v1_14/api/core/v1/mod.rs index 43e4c12471..593f9a8296 100644 --- a/src/v1_14/api/core/v1/mod.rs +++ b/src/v1_14/api/core/v1/mod.rs @@ -1,1104 +1,746 @@ mod aws_elastic_block_store_volume_source; -pub use self::aws_elastic_block_store_volume_source::{ - AWSElasticBlockStoreVolumeSource, -}; +pub use self::aws_elastic_block_store_volume_source::AWSElasticBlockStoreVolumeSource; mod affinity; -pub use self::affinity::{ - Affinity, -}; +pub use self::affinity::Affinity; mod attached_volume; -pub use self::attached_volume::{ - AttachedVolume, -}; +pub use self::attached_volume::AttachedVolume; mod azure_disk_volume_source; -pub use self::azure_disk_volume_source::{ - AzureDiskVolumeSource, -}; +pub use self::azure_disk_volume_source::AzureDiskVolumeSource; mod azure_file_persistent_volume_source; -pub use self::azure_file_persistent_volume_source::{ - AzureFilePersistentVolumeSource, -}; +pub use self::azure_file_persistent_volume_source::AzureFilePersistentVolumeSource; mod azure_file_volume_source; -pub use self::azure_file_volume_source::{ - AzureFileVolumeSource, -}; +pub use self::azure_file_volume_source::AzureFileVolumeSource; mod binding; -pub use self::binding::{ - Binding, - CreateNamespacedBindingOptional, CreateNamespacedBindingResponse, - CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse, -}; +pub use self::binding::Binding; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedBindingOptional, CreateNamespacedBindingResponse}; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse}; mod csi_persistent_volume_source; -pub use self::csi_persistent_volume_source::{ - CSIPersistentVolumeSource, -}; +pub use self::csi_persistent_volume_source::CSIPersistentVolumeSource; mod csi_volume_source; -pub use self::csi_volume_source::{ - CSIVolumeSource, -}; +pub use self::csi_volume_source::CSIVolumeSource; mod capabilities; -pub use self::capabilities::{ - Capabilities, -}; +pub use self::capabilities::Capabilities; mod ceph_fs_persistent_volume_source; -pub use self::ceph_fs_persistent_volume_source::{ - CephFSPersistentVolumeSource, -}; +pub use self::ceph_fs_persistent_volume_source::CephFSPersistentVolumeSource; mod ceph_fs_volume_source; -pub use self::ceph_fs_volume_source::{ - CephFSVolumeSource, -}; +pub use self::ceph_fs_volume_source::CephFSVolumeSource; mod cinder_persistent_volume_source; -pub use self::cinder_persistent_volume_source::{ - CinderPersistentVolumeSource, -}; +pub use self::cinder_persistent_volume_source::CinderPersistentVolumeSource; mod cinder_volume_source; -pub use self::cinder_volume_source::{ - CinderVolumeSource, -}; +pub use self::cinder_volume_source::CinderVolumeSource; mod client_ip_config; -pub use self::client_ip_config::{ - ClientIPConfig, -}; +pub use self::client_ip_config::ClientIPConfig; mod component_condition; -pub use self::component_condition::{ - ComponentCondition, -}; +pub use self::component_condition::ComponentCondition; mod component_status; -pub use self::component_status::{ - ComponentStatus, - ListComponentStatusResponse, - ReadComponentStatusOptional, ReadComponentStatusResponse, - WatchComponentStatusResponse, -}; +pub use self::component_status::ComponentStatus; +#[cfg(feature = "api")] pub use self::component_status::ListComponentStatusResponse; +#[cfg(feature = "api")] pub use self::component_status::{ReadComponentStatusOptional, ReadComponentStatusResponse}; +#[cfg(feature = "api")] pub use self::component_status::WatchComponentStatusResponse; mod component_status_list; -pub use self::component_status_list::{ - ComponentStatusList, -}; +pub use self::component_status_list::ComponentStatusList; mod config_map; -pub use self::config_map::{ - ConfigMap, - CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse, - DeleteCollectionNamespacedConfigMapResponse, - DeleteNamespacedConfigMapResponse, - ListConfigMapForAllNamespacesResponse, - ListNamespacedConfigMapResponse, - PatchNamespacedConfigMapResponse, - ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse, - ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse, - WatchConfigMapForAllNamespacesResponse, - WatchNamespacedConfigMapResponse, -}; +pub use self::config_map::ConfigMap; +#[cfg(feature = "api")] pub use self::config_map::{CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::DeleteCollectionNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::DeleteNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::ListConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::ListNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::PatchNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::{ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::{ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::WatchConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::WatchNamespacedConfigMapResponse; mod config_map_env_source; -pub use self::config_map_env_source::{ - ConfigMapEnvSource, -}; +pub use self::config_map_env_source::ConfigMapEnvSource; mod config_map_key_selector; -pub use self::config_map_key_selector::{ - ConfigMapKeySelector, -}; +pub use self::config_map_key_selector::ConfigMapKeySelector; mod config_map_list; -pub use self::config_map_list::{ - ConfigMapList, -}; +pub use self::config_map_list::ConfigMapList; mod config_map_node_config_source; -pub use self::config_map_node_config_source::{ - ConfigMapNodeConfigSource, -}; +pub use self::config_map_node_config_source::ConfigMapNodeConfigSource; mod config_map_projection; -pub use self::config_map_projection::{ - ConfigMapProjection, -}; +pub use self::config_map_projection::ConfigMapProjection; mod config_map_volume_source; -pub use self::config_map_volume_source::{ - ConfigMapVolumeSource, -}; +pub use self::config_map_volume_source::ConfigMapVolumeSource; mod container; -pub use self::container::{ - Container, -}; +pub use self::container::Container; mod container_image; -pub use self::container_image::{ - ContainerImage, -}; +pub use self::container_image::ContainerImage; mod container_port; -pub use self::container_port::{ - ContainerPort, -}; +pub use self::container_port::ContainerPort; mod container_state; -pub use self::container_state::{ - ContainerState, -}; +pub use self::container_state::ContainerState; mod container_state_running; -pub use self::container_state_running::{ - ContainerStateRunning, -}; +pub use self::container_state_running::ContainerStateRunning; mod container_state_terminated; -pub use self::container_state_terminated::{ - ContainerStateTerminated, -}; +pub use self::container_state_terminated::ContainerStateTerminated; mod container_state_waiting; -pub use self::container_state_waiting::{ - ContainerStateWaiting, -}; +pub use self::container_state_waiting::ContainerStateWaiting; mod container_status; -pub use self::container_status::{ - ContainerStatus, -}; +pub use self::container_status::ContainerStatus; mod daemon_endpoint; -pub use self::daemon_endpoint::{ - DaemonEndpoint, -}; +pub use self::daemon_endpoint::DaemonEndpoint; mod downward_api_projection; -pub use self::downward_api_projection::{ - DownwardAPIProjection, -}; +pub use self::downward_api_projection::DownwardAPIProjection; mod downward_api_volume_file; -pub use self::downward_api_volume_file::{ - DownwardAPIVolumeFile, -}; +pub use self::downward_api_volume_file::DownwardAPIVolumeFile; mod downward_api_volume_source; -pub use self::downward_api_volume_source::{ - DownwardAPIVolumeSource, -}; +pub use self::downward_api_volume_source::DownwardAPIVolumeSource; mod empty_dir_volume_source; -pub use self::empty_dir_volume_source::{ - EmptyDirVolumeSource, -}; +pub use self::empty_dir_volume_source::EmptyDirVolumeSource; mod endpoint_address; -pub use self::endpoint_address::{ - EndpointAddress, -}; +pub use self::endpoint_address::EndpointAddress; mod endpoint_port; -pub use self::endpoint_port::{ - EndpointPort, -}; +pub use self::endpoint_port::EndpointPort; mod endpoint_subset; -pub use self::endpoint_subset::{ - EndpointSubset, -}; +pub use self::endpoint_subset::EndpointSubset; mod endpoints; -pub use self::endpoints::{ - Endpoints, - CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse, - DeleteCollectionNamespacedEndpointsResponse, - DeleteNamespacedEndpointsResponse, - ListEndpointsForAllNamespacesResponse, - ListNamespacedEndpointsResponse, - PatchNamespacedEndpointsResponse, - ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse, - ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse, - WatchEndpointsForAllNamespacesResponse, - WatchNamespacedEndpointsResponse, -}; +pub use self::endpoints::Endpoints; +#[cfg(feature = "api")] pub use self::endpoints::{CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::DeleteCollectionNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::DeleteNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::PatchNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::{ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::{ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::WatchEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::WatchNamespacedEndpointsResponse; mod endpoints_list; -pub use self::endpoints_list::{ - EndpointsList, -}; +pub use self::endpoints_list::EndpointsList; mod env_from_source; -pub use self::env_from_source::{ - EnvFromSource, -}; +pub use self::env_from_source::EnvFromSource; mod env_var; -pub use self::env_var::{ - EnvVar, -}; +pub use self::env_var::EnvVar; mod env_var_source; -pub use self::env_var_source::{ - EnvVarSource, -}; +pub use self::env_var_source::EnvVarSource; mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; mod event_source; -pub use self::event_source::{ - EventSource, -}; +pub use self::event_source::EventSource; mod exec_action; -pub use self::exec_action::{ - ExecAction, -}; +pub use self::exec_action::ExecAction; mod fc_volume_source; -pub use self::fc_volume_source::{ - FCVolumeSource, -}; +pub use self::fc_volume_source::FCVolumeSource; mod flex_persistent_volume_source; -pub use self::flex_persistent_volume_source::{ - FlexPersistentVolumeSource, -}; +pub use self::flex_persistent_volume_source::FlexPersistentVolumeSource; mod flex_volume_source; -pub use self::flex_volume_source::{ - FlexVolumeSource, -}; +pub use self::flex_volume_source::FlexVolumeSource; mod flocker_volume_source; -pub use self::flocker_volume_source::{ - FlockerVolumeSource, -}; +pub use self::flocker_volume_source::FlockerVolumeSource; mod gce_persistent_disk_volume_source; -pub use self::gce_persistent_disk_volume_source::{ - GCEPersistentDiskVolumeSource, -}; +pub use self::gce_persistent_disk_volume_source::GCEPersistentDiskVolumeSource; mod git_repo_volume_source; -pub use self::git_repo_volume_source::{ - GitRepoVolumeSource, -}; +pub use self::git_repo_volume_source::GitRepoVolumeSource; mod glusterfs_persistent_volume_source; -pub use self::glusterfs_persistent_volume_source::{ - GlusterfsPersistentVolumeSource, -}; +pub use self::glusterfs_persistent_volume_source::GlusterfsPersistentVolumeSource; mod glusterfs_volume_source; -pub use self::glusterfs_volume_source::{ - GlusterfsVolumeSource, -}; +pub use self::glusterfs_volume_source::GlusterfsVolumeSource; mod http_get_action; -pub use self::http_get_action::{ - HTTPGetAction, -}; +pub use self::http_get_action::HTTPGetAction; mod http_header; -pub use self::http_header::{ - HTTPHeader, -}; +pub use self::http_header::HTTPHeader; mod handler; -pub use self::handler::{ - Handler, -}; +pub use self::handler::Handler; mod host_alias; -pub use self::host_alias::{ - HostAlias, -}; +pub use self::host_alias::HostAlias; mod host_path_volume_source; -pub use self::host_path_volume_source::{ - HostPathVolumeSource, -}; +pub use self::host_path_volume_source::HostPathVolumeSource; mod iscsi_persistent_volume_source; -pub use self::iscsi_persistent_volume_source::{ - ISCSIPersistentVolumeSource, -}; +pub use self::iscsi_persistent_volume_source::ISCSIPersistentVolumeSource; mod iscsi_volume_source; -pub use self::iscsi_volume_source::{ - ISCSIVolumeSource, -}; +pub use self::iscsi_volume_source::ISCSIVolumeSource; mod key_to_path; -pub use self::key_to_path::{ - KeyToPath, -}; +pub use self::key_to_path::KeyToPath; mod lifecycle; -pub use self::lifecycle::{ - Lifecycle, -}; +pub use self::lifecycle::Lifecycle; mod limit_range; -pub use self::limit_range::{ - LimitRange, - CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse, - DeleteCollectionNamespacedLimitRangeResponse, - DeleteNamespacedLimitRangeResponse, - ListLimitRangeForAllNamespacesResponse, - ListNamespacedLimitRangeResponse, - PatchNamespacedLimitRangeResponse, - ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse, - ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse, - WatchLimitRangeForAllNamespacesResponse, - WatchNamespacedLimitRangeResponse, -}; +pub use self::limit_range::LimitRange; +#[cfg(feature = "api")] pub use self::limit_range::{CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::DeleteCollectionNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::DeleteNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::PatchNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::{ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::{ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::WatchLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::WatchNamespacedLimitRangeResponse; mod limit_range_item; -pub use self::limit_range_item::{ - LimitRangeItem, -}; +pub use self::limit_range_item::LimitRangeItem; mod limit_range_list; -pub use self::limit_range_list::{ - LimitRangeList, -}; +pub use self::limit_range_list::LimitRangeList; mod limit_range_spec; -pub use self::limit_range_spec::{ - LimitRangeSpec, -}; +pub use self::limit_range_spec::LimitRangeSpec; mod load_balancer_ingress; -pub use self::load_balancer_ingress::{ - LoadBalancerIngress, -}; +pub use self::load_balancer_ingress::LoadBalancerIngress; mod load_balancer_status; -pub use self::load_balancer_status::{ - LoadBalancerStatus, -}; +pub use self::load_balancer_status::LoadBalancerStatus; mod local_object_reference; -pub use self::local_object_reference::{ - LocalObjectReference, -}; +pub use self::local_object_reference::LocalObjectReference; mod local_volume_source; -pub use self::local_volume_source::{ - LocalVolumeSource, -}; +pub use self::local_volume_source::LocalVolumeSource; mod nfs_volume_source; -pub use self::nfs_volume_source::{ - NFSVolumeSource, -}; +pub use self::nfs_volume_source::NFSVolumeSource; mod namespace; -pub use self::namespace::{ - Namespace, - CreateNamespaceOptional, CreateNamespaceResponse, - DeleteNamespaceResponse, - ListNamespaceResponse, - PatchNamespaceResponse, - PatchNamespaceStatusResponse, - ReadNamespaceOptional, ReadNamespaceResponse, - ReadNamespaceStatusOptional, ReadNamespaceStatusResponse, - ReplaceNamespaceOptional, ReplaceNamespaceResponse, - ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse, - ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse, - WatchNamespaceResponse, -}; +pub use self::namespace::Namespace; +#[cfg(feature = "api")] pub use self::namespace::{CreateNamespaceOptional, CreateNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::DeleteNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::ListNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceStatusResponse; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceOptional, ReadNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceStatusOptional, ReadNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceOptional, ReplaceNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::WatchNamespaceResponse; mod namespace_list; -pub use self::namespace_list::{ - NamespaceList, -}; +pub use self::namespace_list::NamespaceList; mod namespace_spec; -pub use self::namespace_spec::{ - NamespaceSpec, -}; +pub use self::namespace_spec::NamespaceSpec; mod namespace_status; -pub use self::namespace_status::{ - NamespaceStatus, -}; +pub use self::namespace_status::NamespaceStatus; mod node; -pub use self::node::{ - Node, - ConnectDeleteNodeProxyOptional, - ConnectDeleteNodeProxyWithPathOptional, - ConnectGetNodeProxyOptional, - ConnectGetNodeProxyWithPathOptional, - ConnectPatchNodeProxyOptional, - ConnectPatchNodeProxyWithPathOptional, - ConnectPostNodeProxyOptional, - ConnectPostNodeProxyWithPathOptional, - ConnectPutNodeProxyOptional, - ConnectPutNodeProxyWithPathOptional, - CreateNodeOptional, CreateNodeResponse, - DeleteCollectionNodeResponse, - DeleteNodeResponse, - ListNodeResponse, - PatchNodeResponse, - PatchNodeStatusResponse, - ReadNodeOptional, ReadNodeResponse, - ReadNodeStatusOptional, ReadNodeStatusResponse, - ReplaceNodeOptional, ReplaceNodeResponse, - ReplaceNodeStatusOptional, ReplaceNodeStatusResponse, - WatchNodeResponse, -}; +pub use self::node::Node; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::{CreateNodeOptional, CreateNodeResponse}; +#[cfg(feature = "api")] pub use self::node::DeleteCollectionNodeResponse; +#[cfg(feature = "api")] pub use self::node::DeleteNodeResponse; +#[cfg(feature = "api")] pub use self::node::ListNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeStatusResponse; +#[cfg(feature = "api")] pub use self::node::{ReadNodeOptional, ReadNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReadNodeStatusOptional, ReadNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeOptional, ReplaceNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeStatusOptional, ReplaceNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::WatchNodeResponse; mod node_address; -pub use self::node_address::{ - NodeAddress, -}; +pub use self::node_address::NodeAddress; mod node_affinity; -pub use self::node_affinity::{ - NodeAffinity, -}; +pub use self::node_affinity::NodeAffinity; mod node_condition; -pub use self::node_condition::{ - NodeCondition, -}; +pub use self::node_condition::NodeCondition; mod node_config_source; -pub use self::node_config_source::{ - NodeConfigSource, -}; +pub use self::node_config_source::NodeConfigSource; mod node_config_status; -pub use self::node_config_status::{ - NodeConfigStatus, -}; +pub use self::node_config_status::NodeConfigStatus; mod node_daemon_endpoints; -pub use self::node_daemon_endpoints::{ - NodeDaemonEndpoints, -}; +pub use self::node_daemon_endpoints::NodeDaemonEndpoints; mod node_list; -pub use self::node_list::{ - NodeList, -}; +pub use self::node_list::NodeList; mod node_selector; -pub use self::node_selector::{ - NodeSelector, -}; +pub use self::node_selector::NodeSelector; mod node_selector_requirement; -pub use self::node_selector_requirement::{ - NodeSelectorRequirement, -}; +pub use self::node_selector_requirement::NodeSelectorRequirement; mod node_selector_term; -pub use self::node_selector_term::{ - NodeSelectorTerm, -}; +pub use self::node_selector_term::NodeSelectorTerm; mod node_spec; -pub use self::node_spec::{ - NodeSpec, -}; +pub use self::node_spec::NodeSpec; mod node_status; -pub use self::node_status::{ - NodeStatus, -}; +pub use self::node_status::NodeStatus; mod node_system_info; -pub use self::node_system_info::{ - NodeSystemInfo, -}; +pub use self::node_system_info::NodeSystemInfo; mod object_field_selector; -pub use self::object_field_selector::{ - ObjectFieldSelector, -}; +pub use self::object_field_selector::ObjectFieldSelector; mod object_reference; -pub use self::object_reference::{ - ObjectReference, -}; +pub use self::object_reference::ObjectReference; mod persistent_volume; -pub use self::persistent_volume::{ - PersistentVolume, - CreatePersistentVolumeOptional, CreatePersistentVolumeResponse, - DeleteCollectionPersistentVolumeResponse, - DeletePersistentVolumeResponse, - ListPersistentVolumeResponse, - PatchPersistentVolumeResponse, - PatchPersistentVolumeStatusResponse, - ReadPersistentVolumeOptional, ReadPersistentVolumeResponse, - ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse, - ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse, - ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse, - WatchPersistentVolumeResponse, -}; +pub use self::persistent_volume::PersistentVolume; +#[cfg(feature = "api")] pub use self::persistent_volume::{CreatePersistentVolumeOptional, CreatePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::DeleteCollectionPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::DeletePersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::ListPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeOptional, ReadPersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::WatchPersistentVolumeResponse; mod persistent_volume_claim; -pub use self::persistent_volume_claim::{ - PersistentVolumeClaim, - CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse, - DeleteCollectionNamespacedPersistentVolumeClaimResponse, - DeleteNamespacedPersistentVolumeClaimResponse, - ListNamespacedPersistentVolumeClaimResponse, - ListPersistentVolumeClaimForAllNamespacesResponse, - PatchNamespacedPersistentVolumeClaimResponse, - PatchNamespacedPersistentVolumeClaimStatusResponse, - ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse, - ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse, - ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse, - ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse, - WatchNamespacedPersistentVolumeClaimResponse, - WatchPersistentVolumeClaimForAllNamespacesResponse, -}; +pub use self::persistent_volume_claim::PersistentVolumeClaim; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteCollectionNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListPersistentVolumeClaimForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchPersistentVolumeClaimForAllNamespacesResponse; mod persistent_volume_claim_condition; -pub use self::persistent_volume_claim_condition::{ - PersistentVolumeClaimCondition, -}; +pub use self::persistent_volume_claim_condition::PersistentVolumeClaimCondition; mod persistent_volume_claim_list; -pub use self::persistent_volume_claim_list::{ - PersistentVolumeClaimList, -}; +pub use self::persistent_volume_claim_list::PersistentVolumeClaimList; mod persistent_volume_claim_spec; -pub use self::persistent_volume_claim_spec::{ - PersistentVolumeClaimSpec, -}; +pub use self::persistent_volume_claim_spec::PersistentVolumeClaimSpec; mod persistent_volume_claim_status; -pub use self::persistent_volume_claim_status::{ - PersistentVolumeClaimStatus, -}; +pub use self::persistent_volume_claim_status::PersistentVolumeClaimStatus; mod persistent_volume_claim_volume_source; -pub use self::persistent_volume_claim_volume_source::{ - PersistentVolumeClaimVolumeSource, -}; +pub use self::persistent_volume_claim_volume_source::PersistentVolumeClaimVolumeSource; mod persistent_volume_list; -pub use self::persistent_volume_list::{ - PersistentVolumeList, -}; +pub use self::persistent_volume_list::PersistentVolumeList; mod persistent_volume_spec; -pub use self::persistent_volume_spec::{ - PersistentVolumeSpec, -}; +pub use self::persistent_volume_spec::PersistentVolumeSpec; mod persistent_volume_status; -pub use self::persistent_volume_status::{ - PersistentVolumeStatus, -}; +pub use self::persistent_volume_status::PersistentVolumeStatus; mod photon_persistent_disk_volume_source; -pub use self::photon_persistent_disk_volume_source::{ - PhotonPersistentDiskVolumeSource, -}; +pub use self::photon_persistent_disk_volume_source::PhotonPersistentDiskVolumeSource; mod pod; -pub use self::pod::{ - Pod, - ConnectDeleteNamespacedPodProxyOptional, - ConnectDeleteNamespacedPodProxyWithPathOptional, - ConnectGetNamespacedPodAttachOptional, - ConnectGetNamespacedPodExecOptional, - ConnectGetNamespacedPodPortforwardOptional, - ConnectGetNamespacedPodProxyOptional, - ConnectGetNamespacedPodProxyWithPathOptional, - ConnectPatchNamespacedPodProxyOptional, - ConnectPatchNamespacedPodProxyWithPathOptional, - ConnectPostNamespacedPodAttachOptional, - ConnectPostNamespacedPodExecOptional, - ConnectPostNamespacedPodPortforwardOptional, - ConnectPostNamespacedPodProxyOptional, - ConnectPostNamespacedPodProxyWithPathOptional, - ConnectPutNamespacedPodProxyOptional, - ConnectPutNamespacedPodProxyWithPathOptional, - CreateNamespacedPodOptional, CreateNamespacedPodResponse, - DeleteCollectionNamespacedPodResponse, - DeleteNamespacedPodResponse, - ListNamespacedPodResponse, - ListPodForAllNamespacesResponse, - PatchNamespacedPodResponse, - PatchNamespacedPodStatusResponse, - ReadNamespacedPodOptional, ReadNamespacedPodResponse, - ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse, - ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse, - ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse, - ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse, - WatchNamespacedPodResponse, - WatchPodForAllNamespacesResponse, -}; +pub use self::pod::Pod; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::{CreateNamespacedPodOptional, CreateNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::DeleteCollectionNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::DeleteNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListPodForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodStatusResponse; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodOptional, ReadNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::WatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::WatchPodForAllNamespacesResponse; mod pod_affinity; -pub use self::pod_affinity::{ - PodAffinity, -}; +pub use self::pod_affinity::PodAffinity; mod pod_affinity_term; -pub use self::pod_affinity_term::{ - PodAffinityTerm, -}; +pub use self::pod_affinity_term::PodAffinityTerm; mod pod_anti_affinity; -pub use self::pod_anti_affinity::{ - PodAntiAffinity, -}; +pub use self::pod_anti_affinity::PodAntiAffinity; mod pod_condition; -pub use self::pod_condition::{ - PodCondition, -}; +pub use self::pod_condition::PodCondition; mod pod_dns_config; -pub use self::pod_dns_config::{ - PodDNSConfig, -}; +pub use self::pod_dns_config::PodDNSConfig; mod pod_dns_config_option; -pub use self::pod_dns_config_option::{ - PodDNSConfigOption, -}; +pub use self::pod_dns_config_option::PodDNSConfigOption; mod pod_list; -pub use self::pod_list::{ - PodList, -}; +pub use self::pod_list::PodList; mod pod_readiness_gate; -pub use self::pod_readiness_gate::{ - PodReadinessGate, -}; +pub use self::pod_readiness_gate::PodReadinessGate; mod pod_security_context; -pub use self::pod_security_context::{ - PodSecurityContext, -}; +pub use self::pod_security_context::PodSecurityContext; mod pod_spec; -pub use self::pod_spec::{ - PodSpec, -}; +pub use self::pod_spec::PodSpec; mod pod_status; -pub use self::pod_status::{ - PodStatus, -}; +pub use self::pod_status::PodStatus; mod pod_template; -pub use self::pod_template::{ - PodTemplate, - CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse, - DeleteCollectionNamespacedPodTemplateResponse, - DeleteNamespacedPodTemplateResponse, - ListNamespacedPodTemplateResponse, - ListPodTemplateForAllNamespacesResponse, - PatchNamespacedPodTemplateResponse, - ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse, - ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse, - WatchNamespacedPodTemplateResponse, - WatchPodTemplateForAllNamespacesResponse, -}; +pub use self::pod_template::PodTemplate; +#[cfg(feature = "api")] pub use self::pod_template::{CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::DeleteCollectionNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::DeleteNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListPodTemplateForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_template::PatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::{ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::{ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::WatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::WatchPodTemplateForAllNamespacesResponse; mod pod_template_list; -pub use self::pod_template_list::{ - PodTemplateList, -}; +pub use self::pod_template_list::PodTemplateList; mod pod_template_spec; -pub use self::pod_template_spec::{ - PodTemplateSpec, -}; +pub use self::pod_template_spec::PodTemplateSpec; mod portworx_volume_source; -pub use self::portworx_volume_source::{ - PortworxVolumeSource, -}; +pub use self::portworx_volume_source::PortworxVolumeSource; mod preferred_scheduling_term; -pub use self::preferred_scheduling_term::{ - PreferredSchedulingTerm, -}; +pub use self::preferred_scheduling_term::PreferredSchedulingTerm; mod probe; -pub use self::probe::{ - Probe, -}; +pub use self::probe::Probe; mod projected_volume_source; -pub use self::projected_volume_source::{ - ProjectedVolumeSource, -}; +pub use self::projected_volume_source::ProjectedVolumeSource; mod quobyte_volume_source; -pub use self::quobyte_volume_source::{ - QuobyteVolumeSource, -}; +pub use self::quobyte_volume_source::QuobyteVolumeSource; mod rbd_persistent_volume_source; -pub use self::rbd_persistent_volume_source::{ - RBDPersistentVolumeSource, -}; +pub use self::rbd_persistent_volume_source::RBDPersistentVolumeSource; mod rbd_volume_source; -pub use self::rbd_volume_source::{ - RBDVolumeSource, -}; +pub use self::rbd_volume_source::RBDVolumeSource; mod replication_controller; -pub use self::replication_controller::{ - ReplicationController, - CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse, - DeleteCollectionNamespacedReplicationControllerResponse, - DeleteNamespacedReplicationControllerResponse, - ListNamespacedReplicationControllerResponse, - ListReplicationControllerForAllNamespacesResponse, - PatchNamespacedReplicationControllerResponse, - PatchNamespacedReplicationControllerStatusResponse, - ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse, - ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse, - ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse, - ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse, - WatchNamespacedReplicationControllerResponse, - WatchReplicationControllerForAllNamespacesResponse, -}; +pub use self::replication_controller::ReplicationController; +#[cfg(feature = "api")] pub use self::replication_controller::{CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteCollectionNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListReplicationControllerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerStatusResponse; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::WatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::WatchReplicationControllerForAllNamespacesResponse; mod replication_controller_condition; -pub use self::replication_controller_condition::{ - ReplicationControllerCondition, -}; +pub use self::replication_controller_condition::ReplicationControllerCondition; mod replication_controller_list; -pub use self::replication_controller_list::{ - ReplicationControllerList, -}; +pub use self::replication_controller_list::ReplicationControllerList; mod replication_controller_spec; -pub use self::replication_controller_spec::{ - ReplicationControllerSpec, -}; +pub use self::replication_controller_spec::ReplicationControllerSpec; mod replication_controller_status; -pub use self::replication_controller_status::{ - ReplicationControllerStatus, -}; +pub use self::replication_controller_status::ReplicationControllerStatus; mod resource_field_selector; -pub use self::resource_field_selector::{ - ResourceFieldSelector, -}; +pub use self::resource_field_selector::ResourceFieldSelector; mod resource_quota; -pub use self::resource_quota::{ - ResourceQuota, - CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse, - DeleteCollectionNamespacedResourceQuotaResponse, - DeleteNamespacedResourceQuotaResponse, - ListNamespacedResourceQuotaResponse, - ListResourceQuotaForAllNamespacesResponse, - PatchNamespacedResourceQuotaResponse, - PatchNamespacedResourceQuotaStatusResponse, - ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse, - ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse, - ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse, - ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse, - WatchNamespacedResourceQuotaResponse, - WatchResourceQuotaForAllNamespacesResponse, -}; +pub use self::resource_quota::ResourceQuota; +#[cfg(feature = "api")] pub use self::resource_quota::{CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteCollectionNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListResourceQuotaForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaStatusResponse; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::WatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::WatchResourceQuotaForAllNamespacesResponse; mod resource_quota_list; -pub use self::resource_quota_list::{ - ResourceQuotaList, -}; +pub use self::resource_quota_list::ResourceQuotaList; mod resource_quota_spec; -pub use self::resource_quota_spec::{ - ResourceQuotaSpec, -}; +pub use self::resource_quota_spec::ResourceQuotaSpec; mod resource_quota_status; -pub use self::resource_quota_status::{ - ResourceQuotaStatus, -}; +pub use self::resource_quota_status::ResourceQuotaStatus; mod resource_requirements; -pub use self::resource_requirements::{ - ResourceRequirements, -}; +pub use self::resource_requirements::ResourceRequirements; mod se_linux_options; -pub use self::se_linux_options::{ - SELinuxOptions, -}; +pub use self::se_linux_options::SELinuxOptions; mod scale_io_persistent_volume_source; -pub use self::scale_io_persistent_volume_source::{ - ScaleIOPersistentVolumeSource, -}; +pub use self::scale_io_persistent_volume_source::ScaleIOPersistentVolumeSource; mod scale_io_volume_source; -pub use self::scale_io_volume_source::{ - ScaleIOVolumeSource, -}; +pub use self::scale_io_volume_source::ScaleIOVolumeSource; mod scope_selector; -pub use self::scope_selector::{ - ScopeSelector, -}; +pub use self::scope_selector::ScopeSelector; mod scoped_resource_selector_requirement; -pub use self::scoped_resource_selector_requirement::{ - ScopedResourceSelectorRequirement, -}; +pub use self::scoped_resource_selector_requirement::ScopedResourceSelectorRequirement; mod secret; -pub use self::secret::{ - Secret, - CreateNamespacedSecretOptional, CreateNamespacedSecretResponse, - DeleteCollectionNamespacedSecretResponse, - DeleteNamespacedSecretResponse, - ListNamespacedSecretResponse, - ListSecretForAllNamespacesResponse, - PatchNamespacedSecretResponse, - ReadNamespacedSecretOptional, ReadNamespacedSecretResponse, - ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse, - WatchNamespacedSecretResponse, - WatchSecretForAllNamespacesResponse, -}; +pub use self::secret::Secret; +#[cfg(feature = "api")] pub use self::secret::{CreateNamespacedSecretOptional, CreateNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::DeleteCollectionNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::DeleteNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListSecretForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::secret::PatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::{ReadNamespacedSecretOptional, ReadNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::{ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::WatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::WatchSecretForAllNamespacesResponse; mod secret_env_source; -pub use self::secret_env_source::{ - SecretEnvSource, -}; +pub use self::secret_env_source::SecretEnvSource; mod secret_key_selector; -pub use self::secret_key_selector::{ - SecretKeySelector, -}; +pub use self::secret_key_selector::SecretKeySelector; mod secret_list; -pub use self::secret_list::{ - SecretList, -}; +pub use self::secret_list::SecretList; mod secret_projection; -pub use self::secret_projection::{ - SecretProjection, -}; +pub use self::secret_projection::SecretProjection; mod secret_reference; -pub use self::secret_reference::{ - SecretReference, -}; +pub use self::secret_reference::SecretReference; mod secret_volume_source; -pub use self::secret_volume_source::{ - SecretVolumeSource, -}; +pub use self::secret_volume_source::SecretVolumeSource; mod security_context; -pub use self::security_context::{ - SecurityContext, -}; +pub use self::security_context::SecurityContext; mod service; -pub use self::service::{ - Service, - ConnectDeleteNamespacedServiceProxyOptional, - ConnectDeleteNamespacedServiceProxyWithPathOptional, - ConnectGetNamespacedServiceProxyOptional, - ConnectGetNamespacedServiceProxyWithPathOptional, - ConnectPatchNamespacedServiceProxyOptional, - ConnectPatchNamespacedServiceProxyWithPathOptional, - ConnectPostNamespacedServiceProxyOptional, - ConnectPostNamespacedServiceProxyWithPathOptional, - ConnectPutNamespacedServiceProxyOptional, - ConnectPutNamespacedServiceProxyWithPathOptional, - CreateNamespacedServiceOptional, CreateNamespacedServiceResponse, - DeleteNamespacedServiceResponse, - ListNamespacedServiceResponse, - ListServiceForAllNamespacesResponse, - PatchNamespacedServiceResponse, - PatchNamespacedServiceStatusResponse, - ReadNamespacedServiceOptional, ReadNamespacedServiceResponse, - ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse, - ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse, - ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse, - WatchNamespacedServiceResponse, - WatchServiceForAllNamespacesResponse, -}; +pub use self::service::Service; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::{CreateNamespacedServiceOptional, CreateNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::DeleteNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListServiceForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceStatusResponse; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceOptional, ReadNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::WatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::WatchServiceForAllNamespacesResponse; mod service_account; -pub use self::service_account::{ - ServiceAccount, - CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse, - DeleteCollectionNamespacedServiceAccountResponse, - DeleteNamespacedServiceAccountResponse, - ListNamespacedServiceAccountResponse, - ListServiceAccountForAllNamespacesResponse, - PatchNamespacedServiceAccountResponse, - ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse, - ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse, - WatchNamespacedServiceAccountResponse, - WatchServiceAccountForAllNamespacesResponse, -}; +pub use self::service_account::ServiceAccount; +#[cfg(feature = "api")] pub use self::service_account::{CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::DeleteCollectionNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::DeleteNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListServiceAccountForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service_account::PatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::{ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::{ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::WatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::WatchServiceAccountForAllNamespacesResponse; mod service_account_list; -pub use self::service_account_list::{ - ServiceAccountList, -}; +pub use self::service_account_list::ServiceAccountList; mod service_account_token_projection; -pub use self::service_account_token_projection::{ - ServiceAccountTokenProjection, -}; +pub use self::service_account_token_projection::ServiceAccountTokenProjection; mod service_list; -pub use self::service_list::{ - ServiceList, -}; +pub use self::service_list::ServiceList; mod service_port; -pub use self::service_port::{ - ServicePort, -}; +pub use self::service_port::ServicePort; mod service_spec; -pub use self::service_spec::{ - ServiceSpec, -}; +pub use self::service_spec::ServiceSpec; mod service_status; -pub use self::service_status::{ - ServiceStatus, -}; +pub use self::service_status::ServiceStatus; mod session_affinity_config; -pub use self::session_affinity_config::{ - SessionAffinityConfig, -}; +pub use self::session_affinity_config::SessionAffinityConfig; mod storage_os_persistent_volume_source; -pub use self::storage_os_persistent_volume_source::{ - StorageOSPersistentVolumeSource, -}; +pub use self::storage_os_persistent_volume_source::StorageOSPersistentVolumeSource; mod storage_os_volume_source; -pub use self::storage_os_volume_source::{ - StorageOSVolumeSource, -}; +pub use self::storage_os_volume_source::StorageOSVolumeSource; mod sysctl; -pub use self::sysctl::{ - Sysctl, -}; +pub use self::sysctl::Sysctl; mod tcp_socket_action; -pub use self::tcp_socket_action::{ - TCPSocketAction, -}; +pub use self::tcp_socket_action::TCPSocketAction; mod taint; -pub use self::taint::{ - Taint, -}; +pub use self::taint::Taint; mod toleration; -pub use self::toleration::{ - Toleration, -}; +pub use self::toleration::Toleration; mod topology_selector_label_requirement; -pub use self::topology_selector_label_requirement::{ - TopologySelectorLabelRequirement, -}; +pub use self::topology_selector_label_requirement::TopologySelectorLabelRequirement; mod topology_selector_term; -pub use self::topology_selector_term::{ - TopologySelectorTerm, -}; +pub use self::topology_selector_term::TopologySelectorTerm; mod typed_local_object_reference; -pub use self::typed_local_object_reference::{ - TypedLocalObjectReference, -}; +pub use self::typed_local_object_reference::TypedLocalObjectReference; mod volume; -pub use self::volume::{ - Volume, -}; +pub use self::volume::Volume; mod volume_device; -pub use self::volume_device::{ - VolumeDevice, -}; +pub use self::volume_device::VolumeDevice; mod volume_mount; -pub use self::volume_mount::{ - VolumeMount, -}; +pub use self::volume_mount::VolumeMount; mod volume_node_affinity; -pub use self::volume_node_affinity::{ - VolumeNodeAffinity, -}; +pub use self::volume_node_affinity::VolumeNodeAffinity; mod volume_projection; -pub use self::volume_projection::{ - VolumeProjection, -}; +pub use self::volume_projection::VolumeProjection; mod vsphere_virtual_disk_volume_source; -pub use self::vsphere_virtual_disk_volume_source::{ - VsphereVirtualDiskVolumeSource, -}; +pub use self::vsphere_virtual_disk_volume_source::VsphereVirtualDiskVolumeSource; mod weighted_pod_affinity_term; -pub use self::weighted_pod_affinity_term::{ - WeightedPodAffinityTerm, -}; +pub use self::weighted_pod_affinity_term::WeightedPodAffinityTerm; diff --git a/src/v1_14/api/core/v1/namespace.rs b/src/v1_14/api/core/v1/namespace.rs index c6af536bf0..ef68bc305f 100644 --- a/src/v1_14/api/core/v1/namespace.rs +++ b/src/v1_14/api/core/v1/namespace.rs @@ -29,6 +29,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespace( body: &crate::v1_14::api::core::v1::Namespace, optional: CreateNamespaceOptional<'_>, @@ -62,6 +63,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespaceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespaceResponse { Ok(crate::v1_14::api::core::v1::Namespace), @@ -81,6 +84,7 @@ pub enum CreateNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespace( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::delete_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespaceResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespace( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -251,12 +259,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::list_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespaceResponse { Ok(crate::v1_14::api::core::v1::NamespaceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -304,6 +314,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -331,12 +342,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceResponse { Ok(crate::v1_14::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -384,6 +397,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace_status( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -411,12 +425,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceStatusResponse { Ok(crate::v1_14::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -462,6 +478,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace( name: &str, optional: ReadNamespaceOptional<'_>, @@ -496,6 +513,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -507,12 +525,14 @@ pub struct ReadNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceResponse { Ok(crate::v1_14::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -558,6 +578,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace_status( name: &str, optional: ReadNamespaceStatusOptional<'_>, @@ -584,6 +605,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -591,12 +613,14 @@ pub struct ReadNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceStatusResponse { Ok(crate::v1_14::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -644,6 +668,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace( name: &str, body: &crate::v1_14::api::core::v1::Namespace, @@ -680,6 +705,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -691,6 +717,7 @@ pub struct ReplaceNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceResponse { Ok(crate::v1_14::api::core::v1::Namespace), @@ -698,6 +725,7 @@ pub enum ReplaceNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -753,6 +781,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_finalize( name: &str, body: &crate::v1_14::api::core::v1::Namespace, @@ -789,6 +818,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceFinalizeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -800,6 +830,7 @@ pub struct ReplaceNamespaceFinalizeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceFinalizeResponse { Ok(crate::v1_14::api::core::v1::Namespace), @@ -807,6 +838,7 @@ pub enum ReplaceNamespaceFinalizeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceFinalizeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -862,6 +894,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_status( name: &str, body: &crate::v1_14::api::core::v1::Namespace, @@ -898,6 +931,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -909,6 +943,7 @@ pub struct ReplaceNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceStatusResponse { Ok(crate::v1_14::api::core::v1::Namespace), @@ -916,6 +951,7 @@ pub enum ReplaceNamespaceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -967,6 +1003,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespace( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -985,12 +1022,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::watch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespaceResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/node.rs b/src/v1_14/api/core/v1/node.rs index 9ffd9c902e..f5037b2c1d 100644 --- a/src/v1_14/api/core/v1/node.rs +++ b/src/v1_14/api/core/v1/node.rs @@ -29,6 +29,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy( name: &str, optional: ConnectDeleteNodeProxyOptional<'_>, @@ -52,6 +53,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -76,6 +78,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy_with_path( name: &str, path: &str, @@ -101,6 +104,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -121,6 +125,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy( name: &str, optional: ConnectGetNodeProxyOptional<'_>, @@ -144,6 +149,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -168,6 +174,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy_with_path( name: &str, path: &str, @@ -193,6 +200,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -213,6 +221,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy( name: &str, optional: ConnectPatchNodeProxyOptional<'_>, @@ -236,6 +245,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -260,6 +270,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy_with_path( name: &str, path: &str, @@ -285,6 +296,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -305,6 +317,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy( name: &str, optional: ConnectPostNodeProxyOptional<'_>, @@ -328,6 +341,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -352,6 +366,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy_with_path( name: &str, path: &str, @@ -377,6 +392,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -397,6 +413,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy( name: &str, optional: ConnectPutNodeProxyOptional<'_>, @@ -420,6 +437,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -444,6 +462,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy_with_path( name: &str, path: &str, @@ -469,6 +488,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -489,6 +509,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_node( body: &crate::v1_14::api::core::v1::Node, optional: CreateNodeOptional<'_>, @@ -522,6 +543,7 @@ impl Node { } /// Optional parameters of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -533,6 +555,7 @@ pub struct CreateNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNodeResponse { Ok(crate::v1_14::api::core::v1::Node), @@ -541,6 +564,7 @@ pub enum CreateNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -602,6 +626,7 @@ impl Node { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_node( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -622,6 +647,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_collection_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNodeResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -629,6 +655,7 @@ pub enum DeleteCollectionNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -687,6 +714,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_node( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -706,6 +734,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNodeResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -714,6 +743,7 @@ pub enum DeleteNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -778,6 +808,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_node( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -796,12 +827,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::list_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNodeResponse { Ok(crate::v1_14::api::core::v1::NodeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +882,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -876,12 +910,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeResponse { Ok(crate::v1_14::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -929,6 +965,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node_status( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -956,12 +993,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeStatusResponse { Ok(crate::v1_14::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1007,6 +1046,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node( name: &str, optional: ReadNodeOptional<'_>, @@ -1041,6 +1081,7 @@ impl Node { } /// Optional parameters of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -1052,12 +1093,14 @@ pub struct ReadNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeResponse { Ok(crate::v1_14::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1103,6 +1146,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node_status( name: &str, optional: ReadNodeStatusOptional<'_>, @@ -1129,6 +1173,7 @@ impl Node { } /// Optional parameters of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1136,12 +1181,14 @@ pub struct ReadNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeStatusResponse { Ok(crate::v1_14::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1189,6 +1236,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node( name: &str, body: &crate::v1_14::api::core::v1::Node, @@ -1225,6 +1273,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1236,6 +1285,7 @@ pub struct ReplaceNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeResponse { Ok(crate::v1_14::api::core::v1::Node), @@ -1243,6 +1293,7 @@ pub enum ReplaceNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1298,6 +1349,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node_status( name: &str, body: &crate::v1_14::api::core::v1::Node, @@ -1334,6 +1386,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1345,6 +1398,7 @@ pub struct ReplaceNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeStatusResponse { Ok(crate::v1_14::api::core::v1::Node), @@ -1352,6 +1406,7 @@ pub enum ReplaceNodeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1403,6 +1458,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_node( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1421,12 +1477,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::watch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNodeResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/persistent_volume.rs b/src/v1_14/api/core/v1/persistent_volume.rs index 7813caa401..7cbd61560f 100644 --- a/src/v1_14/api/core/v1/persistent_volume.rs +++ b/src/v1_14/api/core/v1/persistent_volume.rs @@ -29,6 +29,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_persistent_volume( body: &crate::v1_14::api::core::v1::PersistentVolume, optional: CreatePersistentVolumeOptional<'_>, @@ -62,6 +63,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePersistentVolumeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreatePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePersistentVolumeResponse { Ok(crate::v1_14::api::core::v1::PersistentVolume), @@ -81,6 +84,7 @@ pub enum CreatePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl PersistentVolume { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_persistent_volume( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -162,6 +167,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_collection_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPersistentVolumeResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteCollectionPersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -227,6 +234,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_persistent_volume( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -246,6 +254,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePersistentVolumeResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -254,6 +263,7 @@ pub enum DeletePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::list_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeResponse { Ok(crate::v1_14::api::core::v1::PersistentVolumeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeResponse { Ok(crate::v1_14::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume_status( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -496,12 +513,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeStatusResponse { Ok(crate::v1_14::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume( name: &str, optional: ReadPersistentVolumeOptional<'_>, @@ -581,6 +601,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -592,12 +613,14 @@ pub struct ReadPersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeResponse { Ok(crate::v1_14::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -643,6 +666,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume_status( name: &str, optional: ReadPersistentVolumeStatusOptional<'_>, @@ -669,6 +693,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,12 +701,14 @@ pub struct ReadPersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeStatusResponse { Ok(crate::v1_14::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -729,6 +756,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume( name: &str, body: &crate::v1_14::api::core::v1::PersistentVolume, @@ -765,6 +793,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -776,6 +805,7 @@ pub struct ReplacePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeResponse { Ok(crate::v1_14::api::core::v1::PersistentVolume), @@ -783,6 +813,7 @@ pub enum ReplacePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -838,6 +869,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume_status( name: &str, body: &crate::v1_14::api::core::v1::PersistentVolume, @@ -874,6 +906,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -885,6 +918,7 @@ pub struct ReplacePersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeStatusResponse { Ok(crate::v1_14::api::core::v1::PersistentVolume), @@ -892,6 +926,7 @@ pub enum ReplacePersistentVolumeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -943,6 +978,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -961,12 +997,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::watch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/persistent_volume_claim.rs b/src/v1_14/api/core/v1/persistent_volume_claim.rs index 67359d6378..3fa44fc308 100644 --- a/src/v1_14/api/core/v1/persistent_volume_claim.rs +++ b/src/v1_14/api/core/v1/persistent_volume_claim.rs @@ -33,6 +33,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_persistent_volume_claim( namespace: &str, body: &crate::v1_14::api::core::v1::PersistentVolumeClaim, @@ -69,6 +70,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_14::api::core::v1::PersistentVolumeClaim), @@ -88,6 +91,7 @@ pub enum CreateNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl PersistentVolumeClaim { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_persistent_volume_claim( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_collection_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -363,12 +374,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_14::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume_claim_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_14::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_14::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_14::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_14::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_14::api::core::v1::PersistentVolumeClaim), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_14::api::core::v1::PersistentVolumeClaim), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume_claim_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/pod.rs b/src/v1_14/api/core/v1/pod.rs index 9973e8eb88..a214549dc7 100644 --- a/src/v1_14/api/core/v1/pod.rs +++ b/src/v1_14/api/core/v1/pod.rs @@ -33,6 +33,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -86,6 +88,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -137,6 +141,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_attach( name: &str, namespace: &str, @@ -178,6 +183,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -210,6 +216,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_exec( name: &str, namespace: &str, @@ -255,6 +262,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -289,6 +297,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_portforward( name: &str, namespace: &str, @@ -314,6 +323,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -338,6 +348,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy( name: &str, namespace: &str, @@ -363,6 +374,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -391,6 +403,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -418,6 +431,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -442,6 +456,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy( name: &str, namespace: &str, @@ -467,6 +482,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -495,6 +511,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -522,6 +539,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -546,6 +564,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_attach( name: &str, namespace: &str, @@ -587,6 +606,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -619,6 +639,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_exec( name: &str, namespace: &str, @@ -664,6 +685,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -698,6 +720,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_portforward( name: &str, namespace: &str, @@ -723,6 +746,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -747,6 +771,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy( name: &str, namespace: &str, @@ -772,6 +797,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -800,6 +826,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -827,6 +854,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -851,6 +879,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy( name: &str, namespace: &str, @@ -876,6 +905,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -904,6 +934,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -931,6 +962,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -955,6 +987,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod( namespace: &str, body: &crate::v1_14::api::core::v1::Pod, @@ -991,6 +1024,7 @@ impl Pod { } /// Optional parameters of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1002,6 +1036,7 @@ pub struct CreateNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodResponse { Ok(crate::v1_14::api::core::v1::Pod), @@ -1010,6 +1045,7 @@ pub enum CreateNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1075,6 +1111,7 @@ impl Pod { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -1098,6 +1135,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_collection_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -1105,6 +1143,7 @@ pub enum DeleteCollectionNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1167,6 +1206,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod( name: &str, namespace: &str, @@ -1188,6 +1228,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -1196,6 +1237,7 @@ pub enum DeleteNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1264,6 +1306,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -1285,12 +1328,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodResponse { Ok(crate::v1_14::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1334,6 +1379,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1352,12 +1398,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1409,6 +1457,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod( name: &str, namespace: &str, @@ -1438,12 +1487,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodResponse { Ok(crate::v1_14::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1495,6 +1546,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_status( name: &str, namespace: &str, @@ -1524,12 +1576,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodStatusResponse { Ok(crate::v1_14::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1579,6 +1633,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod( name: &str, namespace: &str, @@ -1615,6 +1670,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -1626,12 +1682,14 @@ pub struct ReadNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodResponse { Ok(crate::v1_14::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1681,6 +1739,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_log( name: &str, namespace: &str, @@ -1737,6 +1796,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodLogOptional<'a> { /// The container for which to stream logs. Defaults to only container if there is one container in the pod. @@ -1758,12 +1818,14 @@ pub struct ReadNamespacedPodLogOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodLogResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodLogResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1823,6 +1885,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_status( name: &str, namespace: &str, @@ -1851,6 +1914,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1858,12 +1922,14 @@ pub struct ReadNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodStatusResponse { Ok(crate::v1_14::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1915,6 +1981,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod( name: &str, namespace: &str, @@ -1953,6 +2020,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1964,6 +2032,7 @@ pub struct ReplaceNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodResponse { Ok(crate::v1_14::api::core::v1::Pod), @@ -1971,6 +2040,7 @@ pub enum ReplaceNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2030,6 +2100,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_status( name: &str, namespace: &str, @@ -2068,6 +2139,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -2079,6 +2151,7 @@ pub struct ReplaceNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodStatusResponse { Ok(crate::v1_14::api::core::v1::Pod), @@ -2086,6 +2159,7 @@ pub enum ReplaceNamespacedPodStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2141,6 +2215,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -2162,12 +2237,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2213,6 +2290,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2231,12 +2309,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/pod_template.rs b/src/v1_14/api/core/v1/pod_template.rs index e5ac626901..c6b5232e18 100644 --- a/src/v1_14/api/core/v1/pod_template.rs +++ b/src/v1_14/api/core/v1/pod_template.rs @@ -30,6 +30,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_template( namespace: &str, body: &crate::v1_14::api::core::v1::PodTemplate, @@ -66,6 +67,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodTemplateOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodTemplateResponse { Ok(crate::v1_14::api::core::v1::PodTemplate), @@ -85,6 +88,7 @@ pub enum CreateNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl PodTemplate { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_template( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_collection_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodTemplateResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_template( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodTemplateResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_template( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -360,12 +371,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodTemplateResponse { Ok(crate::v1_14::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_template_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodTemplateForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_template( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::patch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodTemplateResponse { Ok(crate::v1_14::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_template( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodTemplateOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodTemplateResponse { Ok(crate::v1_14::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_template( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodTemplateOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodTemplateResponse { Ok(crate::v1_14::api::core::v1::PodTemplate), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +810,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_template( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -804,12 +832,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodTemplateResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_template_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -873,12 +904,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodTemplateForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/replication_controller.rs b/src/v1_14/api/core/v1/replication_controller.rs index 6b29f6339e..2f86fdc409 100644 --- a/src/v1_14/api/core/v1/replication_controller.rs +++ b/src/v1_14/api/core/v1/replication_controller.rs @@ -33,6 +33,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replication_controller( namespace: &str, body: &crate::v1_14::api::core::v1::ReplicationController, @@ -69,6 +70,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicationControllerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicationControllerResponse { Ok(crate::v1_14::api::core::v1::ReplicationController), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicationController { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replication_controller( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_collection_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicationControllerResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replication_controller( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicationControllerResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replication_controller( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicationControllerResponse { Ok(crate::v1_14::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replication_controller_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicationControllerForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerResponse { Ok(crate::v1_14::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerStatusResponse { Ok(crate::v1_14::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerResponse { Ok(crate::v1_14::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerStatusResponse { Ok(crate::v1_14::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerResponse { Ok(crate::v1_14::api::core::v1::ReplicationController), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerStatusResponse { Ok(crate::v1_14::api::core::v1::ReplicationController), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedReplicationControllerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replication_controller( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicationControllerResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replication_controller_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicationControllerForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/resource_quota.rs b/src/v1_14/api/core/v1/resource_quota.rs index b04f0933f5..42f72e14ec 100644 --- a/src/v1_14/api/core/v1/resource_quota.rs +++ b/src/v1_14/api/core/v1/resource_quota.rs @@ -33,6 +33,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_resource_quota( namespace: &str, body: &crate::v1_14::api::core::v1::ResourceQuota, @@ -69,6 +70,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedResourceQuotaOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedResourceQuotaResponse { Ok(crate::v1_14::api::core::v1::ResourceQuota), @@ -88,6 +91,7 @@ pub enum CreateNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ResourceQuota { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_resource_quota( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_collection_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedResourceQuotaResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_resource_quota( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedResourceQuotaResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_resource_quota( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedResourceQuotaResponse { Ok(crate::v1_14::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_resource_quota_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListResourceQuotaForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaResponse { Ok(crate::v1_14::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaStatusResponse { Ok(crate::v1_14::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaResponse { Ok(crate::v1_14::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaStatusResponse { Ok(crate::v1_14::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaResponse { Ok(crate::v1_14::api::core::v1::ResourceQuota), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaStatusResponse { Ok(crate::v1_14::api::core::v1::ResourceQuota), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedResourceQuotaStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_resource_quota( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedResourceQuotaResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_resource_quota_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchResourceQuotaForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/secret.rs b/src/v1_14/api/core/v1/secret.rs index 25daea7972..9cddf204db 100644 --- a/src/v1_14/api/core/v1/secret.rs +++ b/src/v1_14/api/core/v1/secret.rs @@ -36,6 +36,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_secret( namespace: &str, body: &crate::v1_14::api::core::v1::Secret, @@ -72,6 +73,7 @@ impl Secret { } /// Optional parameters of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedSecretOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedSecretResponse { Ok(crate::v1_14::api::core::v1::Secret), @@ -91,6 +94,7 @@ pub enum CreateNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -156,6 +160,7 @@ impl Secret { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_secret( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -179,6 +184,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_collection_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedSecretResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -248,6 +255,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_secret( name: &str, namespace: &str, @@ -269,6 +277,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedSecretResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -277,6 +286,7 @@ pub enum DeleteNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -345,6 +355,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_secret( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -366,12 +377,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedSecretResponse { Ok(crate::v1_14::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -415,6 +428,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_secret_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -433,12 +447,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListSecretForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -490,6 +506,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_secret( name: &str, namespace: &str, @@ -519,12 +536,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::patch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedSecretResponse { Ok(crate::v1_14::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -574,6 +593,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_secret( name: &str, namespace: &str, @@ -610,6 +630,7 @@ impl Secret { } /// Optional parameters of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedSecretOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -621,12 +642,14 @@ pub struct ReadNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedSecretResponse { Ok(crate::v1_14::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -678,6 +701,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_secret( name: &str, namespace: &str, @@ -716,6 +740,7 @@ impl Secret { } /// Optional parameters of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedSecretOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -727,6 +752,7 @@ pub struct ReplaceNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedSecretResponse { Ok(crate::v1_14::api::core::v1::Secret), @@ -734,6 +760,7 @@ pub enum ReplaceNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -789,6 +816,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_secret( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -810,12 +838,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedSecretResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -861,6 +891,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_secret_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -879,12 +910,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchSecretForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/service.rs b/src/v1_14/api/core/v1/service.rs index fd4b4130a0..0a79449cac 100644 --- a/src/v1_14/api/core/v1/service.rs +++ b/src/v1_14/api/core/v1/service.rs @@ -33,6 +33,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -86,6 +88,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -137,6 +141,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy( name: &str, namespace: &str, @@ -162,6 +167,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -190,6 +196,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -217,6 +224,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -241,6 +249,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy( name: &str, namespace: &str, @@ -266,6 +275,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -294,6 +304,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -321,6 +332,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -345,6 +357,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy( name: &str, namespace: &str, @@ -370,6 +383,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -398,6 +412,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -425,6 +440,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -449,6 +465,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy( name: &str, namespace: &str, @@ -474,6 +491,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -502,6 +520,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -529,6 +548,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -553,6 +573,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service( namespace: &str, body: &crate::v1_14::api::core::v1::Service, @@ -589,6 +610,7 @@ impl Service { } /// Optional parameters of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct CreateNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceResponse { Ok(crate::v1_14::api::core::v1::Service), @@ -608,6 +631,7 @@ pub enum CreateNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -673,6 +697,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service( name: &str, namespace: &str, @@ -694,6 +719,7 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -702,6 +728,7 @@ pub enum DeleteNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -770,6 +797,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -791,12 +819,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceResponse { Ok(crate::v1_14::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +870,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -858,12 +889,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -915,6 +948,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service( name: &str, namespace: &str, @@ -944,12 +978,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceResponse { Ok(crate::v1_14::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1001,6 +1037,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_status( name: &str, namespace: &str, @@ -1030,12 +1067,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceStatusResponse { Ok(crate::v1_14::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1085,6 +1124,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service( name: &str, namespace: &str, @@ -1121,6 +1161,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -1132,12 +1173,14 @@ pub struct ReadNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceResponse { Ok(crate::v1_14::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1187,6 +1230,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_status( name: &str, namespace: &str, @@ -1215,6 +1259,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1222,12 +1267,14 @@ pub struct ReadNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceStatusResponse { Ok(crate::v1_14::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1279,6 +1326,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service( name: &str, namespace: &str, @@ -1317,6 +1365,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1328,6 +1377,7 @@ pub struct ReplaceNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceResponse { Ok(crate::v1_14::api::core::v1::Service), @@ -1335,6 +1385,7 @@ pub enum ReplaceNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1394,6 +1445,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_status( name: &str, namespace: &str, @@ -1432,6 +1484,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1443,6 +1496,7 @@ pub struct ReplaceNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceStatusResponse { Ok(crate::v1_14::api::core::v1::Service), @@ -1450,6 +1504,7 @@ pub enum ReplaceNamespacedServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1505,6 +1560,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1526,12 +1582,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1577,6 +1635,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1595,12 +1654,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/core/v1/service_account.rs b/src/v1_14/api/core/v1/service_account.rs index d8744c934c..9642c57ce3 100644 --- a/src/v1_14/api/core/v1/service_account.rs +++ b/src/v1_14/api/core/v1/service_account.rs @@ -36,6 +36,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service_account( namespace: &str, body: &crate::v1_14::api::core::v1::ServiceAccount, @@ -72,6 +73,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceAccountOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceAccountResponse { Ok(crate::v1_14::api::core::v1::ServiceAccount), @@ -91,6 +94,7 @@ pub enum CreateNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -156,6 +160,7 @@ impl ServiceAccount { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_service_account( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -179,6 +184,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_collection_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedServiceAccountResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -248,6 +255,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service_account( name: &str, namespace: &str, @@ -269,6 +277,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceAccountResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -277,6 +286,7 @@ pub enum DeleteNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -345,6 +355,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service_account( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -366,12 +377,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceAccountResponse { Ok(crate::v1_14::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -415,6 +428,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_account_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -433,12 +447,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceAccountForAllNamespacesResponse { Ok(crate::v1_14::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -490,6 +506,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_account( name: &str, namespace: &str, @@ -519,12 +536,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::patch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceAccountResponse { Ok(crate::v1_14::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -574,6 +593,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_account( name: &str, namespace: &str, @@ -610,6 +630,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceAccountOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -621,12 +642,14 @@ pub struct ReadNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceAccountResponse { Ok(crate::v1_14::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -678,6 +701,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_account( name: &str, namespace: &str, @@ -716,6 +740,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceAccountOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -727,6 +752,7 @@ pub struct ReplaceNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceAccountResponse { Ok(crate::v1_14::api::core::v1::ServiceAccount), @@ -734,6 +760,7 @@ pub enum ReplaceNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -789,6 +816,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service_account( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -810,12 +838,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceAccountResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -861,6 +891,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_account_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -879,12 +910,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceAccountForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/events/v1beta1/event.rs b/src/v1_14/api/events/v1beta1/event.rs index 58966ceb57..f26cce98d4 100644 --- a/src/v1_14/api/events/v1beta1/event.rs +++ b/src/v1_14/api/events/v1beta1/event.rs @@ -68,6 +68,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_14::api::events::v1beta1::Event, @@ -104,6 +105,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -115,6 +117,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_14::api::events::v1beta1::Event), @@ -123,6 +126,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -188,6 +192,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -211,6 +216,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -218,6 +224,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -280,6 +287,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -301,6 +309,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -309,6 +318,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +383,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +402,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_14::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -444,6 +457,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -465,12 +479,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_14::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -522,6 +538,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -551,12 +568,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_14::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -606,6 +625,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -642,6 +662,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -653,12 +674,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_14::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -710,6 +733,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -748,6 +772,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -759,6 +784,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_14::api::events::v1beta1::Event), @@ -766,6 +792,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -817,6 +844,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -835,12 +863,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -890,6 +920,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -911,12 +942,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/events/v1beta1/mod.rs b/src/v1_14/api/events/v1beta1/mod.rs index 34d0b5bf3a..0029a47de6 100644 --- a/src/v1_14/api/events/v1beta1/mod.rs +++ b/src/v1_14/api/events/v1beta1/mod.rs @@ -1,25 +1,19 @@ mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; diff --git a/src/v1_14/api/extensions/v1beta1/daemon_set.rs b/src/v1_14/api/extensions/v1beta1/daemon_set.rs index 6bdb3c7b6f..b7178a1b69 100644 --- a/src/v1_14/api/extensions/v1beta1/daemon_set.rs +++ b/src/v1_14/api/extensions/v1beta1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_14::api::extensions::v1beta1::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_14::api::extensions::v1beta1::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_14::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_14::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_14::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_14::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_14::api::extensions::v1beta1::DaemonSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::DaemonSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/extensions/v1beta1/deployment.rs b/src/v1_14/api/extensions/v1beta1/deployment.rs index 8dabc85119..df7151b33b 100644 --- a/src/v1_14/api/extensions/v1beta1/deployment.rs +++ b/src/v1_14/api/extensions/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_14::api::extensions::v1beta1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_14::api::extensions::v1beta1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_14::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_14::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_14::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_14::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_14::api::extensions::v1beta1::Deployment), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::Deployment), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/extensions/v1beta1/deployment_rollback.rs b/src/v1_14/api/extensions/v1beta1/deployment_rollback.rs index a96d248559..6f4ba6861c 100644 --- a/src/v1_14/api/extensions/v1beta1/deployment_rollback.rs +++ b/src/v1_14/api/extensions/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -75,6 +76,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -86,6 +88,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -94,6 +97,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/extensions/v1beta1/ingress.rs b/src/v1_14/api/extensions/v1beta1/ingress.rs index 3686aa5b6f..3125697471 100644 --- a/src/v1_14/api/extensions/v1beta1/ingress.rs +++ b/src/v1_14/api/extensions/v1beta1/ingress.rs @@ -33,6 +33,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_ingress( namespace: &str, body: &crate::v1_14::api::extensions::v1beta1::Ingress, @@ -69,6 +70,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedIngressResponse { Ok(crate::v1_14::api::extensions::v1beta1::Ingress), @@ -88,6 +91,7 @@ pub enum CreateNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Ingress { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_ingress( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_collection_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedIngressResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_ingress( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedIngressResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_ingress_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListIngressForAllNamespacesResponse { Ok(crate::v1_14::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_ingress( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedIngressResponse { Ok(crate::v1_14::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressResponse { Ok(crate::v1_14::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressResponse { Ok(crate::v1_14::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressResponse { Ok(crate::v1_14::api::extensions::v1beta1::Ingress), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::Ingress), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedIngressStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_ingress_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchIngressForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_ingress( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedIngressResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/extensions/v1beta1/mod.rs b/src/v1_14/api/extensions/v1beta1/mod.rs index 4f8ee04159..4903e4ae0f 100644 --- a/src/v1_14/api/extensions/v1beta1/mod.rs +++ b/src/v1_14/api/extensions/v1beta1/mod.rs @@ -1,350 +1,242 @@ mod allowed_csi_driver; -pub use self::allowed_csi_driver::{ - AllowedCSIDriver, -}; +pub use self::allowed_csi_driver::AllowedCSIDriver; mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod http_ingress_path; -pub use self::http_ingress_path::{ - HTTPIngressPath, -}; +pub use self::http_ingress_path::HTTPIngressPath; mod http_ingress_rule_value; -pub use self::http_ingress_rule_value::{ - HTTPIngressRuleValue, -}; +pub use self::http_ingress_rule_value::HTTPIngressRuleValue; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod ingress; -pub use self::ingress::{ - Ingress, - CreateNamespacedIngressOptional, CreateNamespacedIngressResponse, - DeleteCollectionNamespacedIngressResponse, - DeleteNamespacedIngressResponse, - ListIngressForAllNamespacesResponse, - ListNamespacedIngressResponse, - PatchNamespacedIngressResponse, - PatchNamespacedIngressStatusResponse, - ReadNamespacedIngressOptional, ReadNamespacedIngressResponse, - ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse, - ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse, - ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse, - WatchIngressForAllNamespacesResponse, - WatchNamespacedIngressResponse, -}; +pub use self::ingress::Ingress; +#[cfg(feature = "api")] pub use self::ingress::{CreateNamespacedIngressOptional, CreateNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::DeleteCollectionNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::DeleteNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::ListIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::ListNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressStatusResponse; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressOptional, ReadNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::WatchIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::WatchNamespacedIngressResponse; mod ingress_backend; -pub use self::ingress_backend::{ - IngressBackend, -}; +pub use self::ingress_backend::IngressBackend; mod ingress_list; -pub use self::ingress_list::{ - IngressList, -}; +pub use self::ingress_list::IngressList; mod ingress_rule; -pub use self::ingress_rule::{ - IngressRule, -}; +pub use self::ingress_rule::IngressRule; mod ingress_spec; -pub use self::ingress_spec::{ - IngressSpec, -}; +pub use self::ingress_spec::IngressSpec; mod ingress_status; -pub use self::ingress_status::{ - IngressStatus, -}; +pub use self::ingress_status::IngressStatus; mod ingress_tls; -pub use self::ingress_tls::{ - IngressTLS, -}; +pub use self::ingress_tls::IngressTLS; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod run_as_group_strategy_options; -pub use self::run_as_group_strategy_options::{ - RunAsGroupStrategyOptions, -}; +pub use self::run_as_group_strategy_options::RunAsGroupStrategyOptions; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedReplicationControllerDummyScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerDummyScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_14/api/extensions/v1beta1/network_policy.rs b/src/v1_14/api/extensions/v1beta1/network_policy.rs index be3721fc27..9196ca858c 100644 --- a/src/v1_14/api/extensions/v1beta1/network_policy.rs +++ b/src/v1_14/api/extensions/v1beta1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_14::api::extensions::v1beta1::NetworkPolicy, @@ -66,6 +67,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_14::api::extensions::v1beta1::NetworkPolicy), @@ -85,6 +88,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -360,12 +371,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_14::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_14::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_14::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_14::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_14::api::extensions::v1beta1::NetworkPolicy), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +810,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -804,12 +832,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -873,12 +904,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/extensions/v1beta1/pod_security_policy.rs b/src/v1_14/api/extensions/v1beta1/pod_security_policy.rs index 14f81fdb86..4bec36d4fd 100644 --- a/src/v1_14/api/extensions/v1beta1/pod_security_policy.rs +++ b/src/v1_14/api/extensions/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_14::api::extensions::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -59,6 +60,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_14::api::extensions::v1beta1::PodSecurityPolicy), @@ -78,6 +81,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -159,6 +164,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_14::api::extensions::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_14::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -498,6 +515,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_14::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_14::api::extensions::v1beta1::PodSecurityPolicy, @@ -598,6 +619,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_14::api::extensions::v1beta1::PodSecurityPolicy), @@ -616,6 +639,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/extensions/v1beta1/replica_set.rs b/src/v1_14/api/extensions/v1beta1/replica_set.rs index 94358f0fa7..df1a3ba720 100644 --- a/src/v1_14/api/extensions/v1beta1/replica_set.rs +++ b/src/v1_14/api/extensions/v1beta1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_14::api::extensions::v1beta1::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_14::api::extensions::v1beta1::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_14::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_14::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_14::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_14::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_14::api::extensions::v1beta1::ReplicaSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_14::api::extensions::v1beta1::ReplicaSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/extensions/v1beta1/scale.rs b/src/v1_14/api/extensions/v1beta1/scale.rs index 2ea4d3e01b..676c425d4b 100644 --- a/src/v1_14/api/extensions/v1beta1/scale.rs +++ b/src/v1_14/api/extensions/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_14::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_14::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_14::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_14::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -603,6 +625,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -614,6 +637,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_14::api::extensions::v1beta1::Scale), @@ -621,6 +645,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -680,6 +705,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -718,6 +744,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -729,6 +756,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_14::api::extensions::v1beta1::Scale), @@ -736,6 +764,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -795,6 +824,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -833,6 +863,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -844,6 +875,7 @@ pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_14::api::extensions::v1beta1::Scale), @@ -851,6 +883,7 @@ pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/networking/v1/mod.rs b/src/v1_14/api/networking/v1/mod.rs index fcd95f99a8..23233ec53d 100644 --- a/src/v1_14/api/networking/v1/mod.rs +++ b/src/v1_14/api/networking/v1/mod.rs @@ -1,50 +1,34 @@ mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; diff --git a/src/v1_14/api/networking/v1/network_policy.rs b/src/v1_14/api/networking/v1/network_policy.rs index 4759c10909..14f988de91 100644 --- a/src/v1_14/api/networking/v1/network_policy.rs +++ b/src/v1_14/api/networking/v1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_14::api::networking::v1::NetworkPolicy, @@ -66,6 +67,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_14::api::networking::v1::NetworkPolicy), @@ -85,6 +88,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -360,12 +371,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_14::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_14::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_14::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_14::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_14::api::networking::v1::NetworkPolicy), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +810,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -804,12 +832,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -873,12 +904,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/networking/v1beta1/ingress.rs b/src/v1_14/api/networking/v1beta1/ingress.rs index 2e87b346ae..be46f98f85 100644 --- a/src/v1_14/api/networking/v1beta1/ingress.rs +++ b/src/v1_14/api/networking/v1beta1/ingress.rs @@ -33,6 +33,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_ingress( namespace: &str, body: &crate::v1_14::api::networking::v1beta1::Ingress, @@ -69,6 +70,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedIngressResponse { Ok(crate::v1_14::api::networking::v1beta1::Ingress), @@ -88,6 +91,7 @@ pub enum CreateNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Ingress { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_ingress( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_collection_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedIngressResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_ingress( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedIngressResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_ingress_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListIngressForAllNamespacesResponse { Ok(crate::v1_14::api::networking::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_ingress( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedIngressResponse { Ok(crate::v1_14::api::networking::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressResponse { Ok(crate::v1_14::api::networking::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressStatusResponse { Ok(crate::v1_14::api::networking::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressResponse { Ok(crate::v1_14::api::networking::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressStatusResponse { Ok(crate::v1_14::api::networking::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressResponse { Ok(crate::v1_14::api::networking::v1beta1::Ingress), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressStatusResponse { Ok(crate::v1_14::api::networking::v1beta1::Ingress), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedIngressStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_ingress_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchIngressForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_ingress( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedIngressResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/networking/v1beta1/mod.rs b/src/v1_14/api/networking/v1beta1/mod.rs index a8480f74ed..85a9f2f6cf 100644 --- a/src/v1_14/api/networking/v1beta1/mod.rs +++ b/src/v1_14/api/networking/v1beta1/mod.rs @@ -1,58 +1,40 @@ mod http_ingress_path; -pub use self::http_ingress_path::{ - HTTPIngressPath, -}; +pub use self::http_ingress_path::HTTPIngressPath; mod http_ingress_rule_value; -pub use self::http_ingress_rule_value::{ - HTTPIngressRuleValue, -}; +pub use self::http_ingress_rule_value::HTTPIngressRuleValue; mod ingress; -pub use self::ingress::{ - Ingress, - CreateNamespacedIngressOptional, CreateNamespacedIngressResponse, - DeleteCollectionNamespacedIngressResponse, - DeleteNamespacedIngressResponse, - ListIngressForAllNamespacesResponse, - ListNamespacedIngressResponse, - PatchNamespacedIngressResponse, - PatchNamespacedIngressStatusResponse, - ReadNamespacedIngressOptional, ReadNamespacedIngressResponse, - ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse, - ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse, - ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse, - WatchIngressForAllNamespacesResponse, - WatchNamespacedIngressResponse, -}; +pub use self::ingress::Ingress; +#[cfg(feature = "api")] pub use self::ingress::{CreateNamespacedIngressOptional, CreateNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::DeleteCollectionNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::DeleteNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::ListIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::ListNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressStatusResponse; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressOptional, ReadNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::WatchIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::WatchNamespacedIngressResponse; mod ingress_backend; -pub use self::ingress_backend::{ - IngressBackend, -}; +pub use self::ingress_backend::IngressBackend; mod ingress_list; -pub use self::ingress_list::{ - IngressList, -}; +pub use self::ingress_list::IngressList; mod ingress_rule; -pub use self::ingress_rule::{ - IngressRule, -}; +pub use self::ingress_rule::IngressRule; mod ingress_spec; -pub use self::ingress_spec::{ - IngressSpec, -}; +pub use self::ingress_spec::IngressSpec; mod ingress_status; -pub use self::ingress_status::{ - IngressStatus, -}; +pub use self::ingress_status::IngressStatus; mod ingress_tls; -pub use self::ingress_tls::{ - IngressTLS, -}; +pub use self::ingress_tls::IngressTLS; diff --git a/src/v1_14/api/node/v1alpha1/mod.rs b/src/v1_14/api/node/v1alpha1/mod.rs index a2d1830949..ecdaf49f9c 100644 --- a/src/v1_14/api/node/v1alpha1/mod.rs +++ b/src/v1_14/api/node/v1alpha1/mod.rs @@ -1,23 +1,17 @@ mod runtime_class; -pub use self::runtime_class::{ - RuntimeClass, - CreateRuntimeClassOptional, CreateRuntimeClassResponse, - DeleteCollectionRuntimeClassResponse, - DeleteRuntimeClassResponse, - ListRuntimeClassResponse, - PatchRuntimeClassResponse, - ReadRuntimeClassOptional, ReadRuntimeClassResponse, - ReplaceRuntimeClassOptional, ReplaceRuntimeClassResponse, - WatchRuntimeClassResponse, -}; +pub use self::runtime_class::RuntimeClass; +#[cfg(feature = "api")] pub use self::runtime_class::{CreateRuntimeClassOptional, CreateRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::DeleteCollectionRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::DeleteRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::ListRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::PatchRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::{ReadRuntimeClassOptional, ReadRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::{ReplaceRuntimeClassOptional, ReplaceRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::WatchRuntimeClassResponse; mod runtime_class_list; -pub use self::runtime_class_list::{ - RuntimeClassList, -}; +pub use self::runtime_class_list::RuntimeClassList; mod runtime_class_spec; -pub use self::runtime_class_spec::{ - RuntimeClassSpec, -}; +pub use self::runtime_class_spec::RuntimeClassSpec; diff --git a/src/v1_14/api/node/v1alpha1/runtime_class.rs b/src/v1_14/api/node/v1alpha1/runtime_class.rs index 1040f183e0..2fbba9d99e 100644 --- a/src/v1_14/api/node/v1alpha1/runtime_class.rs +++ b/src/v1_14/api/node/v1alpha1/runtime_class.rs @@ -26,6 +26,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_runtime_class( body: &crate::v1_14::api::node::v1alpha1::RuntimeClass, optional: CreateRuntimeClassOptional<'_>, @@ -59,6 +60,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::create_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateRuntimeClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::create_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateRuntimeClassResponse { Ok(crate::v1_14::api::node::v1alpha1::RuntimeClass), @@ -78,6 +81,7 @@ pub enum CreateRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl RuntimeClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_runtime_class( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -159,6 +164,7 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::delete_collection_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionRuntimeClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_runtime_class( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::delete_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteRuntimeClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_runtime_class( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::list_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRuntimeClassResponse { Ok(crate::v1_14::api::node::v1alpha1::RuntimeClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_runtime_class( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::patch_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchRuntimeClassResponse { Ok(crate::v1_14::api::node::v1alpha1::RuntimeClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_runtime_class( name: &str, optional: ReadRuntimeClassOptional<'_>, @@ -498,6 +515,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::read_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadRuntimeClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::read_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadRuntimeClassResponse { Ok(crate::v1_14::api::node::v1alpha1::RuntimeClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_runtime_class( name: &str, body: &crate::v1_14::api::node::v1alpha1::RuntimeClass, @@ -598,6 +619,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::replace_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceRuntimeClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::replace_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceRuntimeClassResponse { Ok(crate::v1_14::api::node::v1alpha1::RuntimeClass), @@ -616,6 +639,7 @@ pub enum ReplaceRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_runtime_class( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::watch_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRuntimeClassResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/node/v1beta1/mod.rs b/src/v1_14/api/node/v1beta1/mod.rs index 198e49cbe3..82fb9e3331 100644 --- a/src/v1_14/api/node/v1beta1/mod.rs +++ b/src/v1_14/api/node/v1beta1/mod.rs @@ -1,18 +1,14 @@ mod runtime_class; -pub use self::runtime_class::{ - RuntimeClass, - CreateRuntimeClassOptional, CreateRuntimeClassResponse, - DeleteCollectionRuntimeClassResponse, - DeleteRuntimeClassResponse, - ListRuntimeClassResponse, - PatchRuntimeClassResponse, - ReadRuntimeClassOptional, ReadRuntimeClassResponse, - ReplaceRuntimeClassOptional, ReplaceRuntimeClassResponse, - WatchRuntimeClassResponse, -}; +pub use self::runtime_class::RuntimeClass; +#[cfg(feature = "api")] pub use self::runtime_class::{CreateRuntimeClassOptional, CreateRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::DeleteCollectionRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::DeleteRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::ListRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::PatchRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::{ReadRuntimeClassOptional, ReadRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::{ReplaceRuntimeClassOptional, ReplaceRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::WatchRuntimeClassResponse; mod runtime_class_list; -pub use self::runtime_class_list::{ - RuntimeClassList, -}; +pub use self::runtime_class_list::RuntimeClassList; diff --git a/src/v1_14/api/node/v1beta1/runtime_class.rs b/src/v1_14/api/node/v1beta1/runtime_class.rs index a0df6221fc..2e6aba21f5 100644 --- a/src/v1_14/api/node/v1beta1/runtime_class.rs +++ b/src/v1_14/api/node/v1beta1/runtime_class.rs @@ -26,6 +26,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_runtime_class( body: &crate::v1_14::api::node::v1beta1::RuntimeClass, optional: CreateRuntimeClassOptional<'_>, @@ -59,6 +60,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::create_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateRuntimeClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::create_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateRuntimeClassResponse { Ok(crate::v1_14::api::node::v1beta1::RuntimeClass), @@ -78,6 +81,7 @@ pub enum CreateRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl RuntimeClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_runtime_class( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -159,6 +164,7 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::delete_collection_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionRuntimeClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_runtime_class( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::delete_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteRuntimeClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_runtime_class( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::list_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRuntimeClassResponse { Ok(crate::v1_14::api::node::v1beta1::RuntimeClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_runtime_class( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::patch_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchRuntimeClassResponse { Ok(crate::v1_14::api::node::v1beta1::RuntimeClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_runtime_class( name: &str, optional: ReadRuntimeClassOptional<'_>, @@ -498,6 +515,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::read_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadRuntimeClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::read_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadRuntimeClassResponse { Ok(crate::v1_14::api::node::v1beta1::RuntimeClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_runtime_class( name: &str, body: &crate::v1_14::api::node::v1beta1::RuntimeClass, @@ -598,6 +619,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::replace_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceRuntimeClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::replace_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceRuntimeClassResponse { Ok(crate::v1_14::api::node::v1beta1::RuntimeClass), @@ -616,6 +639,7 @@ pub enum ReplaceRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_runtime_class( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::watch_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRuntimeClassResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/policy/v1beta1/eviction.rs b/src/v1_14/api/policy/v1beta1/eviction.rs index 11f15c9929..caad319940 100644 --- a/src/v1_14/api/policy/v1beta1/eviction.rs +++ b/src/v1_14/api/policy/v1beta1/eviction.rs @@ -34,6 +34,7 @@ impl Eviction { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_eviction( name: &str, namespace: &str, @@ -72,6 +73,7 @@ impl Eviction { } /// Optional parameters of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodEvictionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedPodEvictionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodEvictionResponse { Ok(crate::v1_14::api::policy::v1beta1::Eviction), @@ -91,6 +94,7 @@ pub enum CreateNamespacedPodEvictionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodEvictionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/policy/v1beta1/mod.rs b/src/v1_14/api/policy/v1beta1/mod.rs index c4fa8d0018..b1da4e6f19 100644 --- a/src/v1_14/api/policy/v1beta1/mod.rs +++ b/src/v1_14/api/policy/v1beta1/mod.rs @@ -1,112 +1,76 @@ mod allowed_csi_driver; -pub use self::allowed_csi_driver::{ - AllowedCSIDriver, -}; +pub use self::allowed_csi_driver::AllowedCSIDriver; mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod eviction; -pub use self::eviction::{ - Eviction, - CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse, -}; +pub use self::eviction::Eviction; +#[cfg(feature = "api")] pub use self::eviction::{CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse}; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod pod_disruption_budget; -pub use self::pod_disruption_budget::{ - PodDisruptionBudget, - CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse, - DeleteCollectionNamespacedPodDisruptionBudgetResponse, - DeleteNamespacedPodDisruptionBudgetResponse, - ListNamespacedPodDisruptionBudgetResponse, - ListPodDisruptionBudgetForAllNamespacesResponse, - PatchNamespacedPodDisruptionBudgetResponse, - PatchNamespacedPodDisruptionBudgetStatusResponse, - ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse, - ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse, - ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse, - ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse, - WatchNamespacedPodDisruptionBudgetResponse, - WatchPodDisruptionBudgetForAllNamespacesResponse, -}; +pub use self::pod_disruption_budget::PodDisruptionBudget; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteCollectionNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListPodDisruptionBudgetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetStatusResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchPodDisruptionBudgetForAllNamespacesResponse; mod pod_disruption_budget_list; -pub use self::pod_disruption_budget_list::{ - PodDisruptionBudgetList, -}; +pub use self::pod_disruption_budget_list::PodDisruptionBudgetList; mod pod_disruption_budget_spec; -pub use self::pod_disruption_budget_spec::{ - PodDisruptionBudgetSpec, -}; +pub use self::pod_disruption_budget_spec::PodDisruptionBudgetSpec; mod pod_disruption_budget_status; -pub use self::pod_disruption_budget_status::{ - PodDisruptionBudgetStatus, -}; +pub use self::pod_disruption_budget_status::PodDisruptionBudgetStatus; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod run_as_group_strategy_options; -pub use self::run_as_group_strategy_options::{ - RunAsGroupStrategyOptions, -}; +pub use self::run_as_group_strategy_options::RunAsGroupStrategyOptions; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_14/api/policy/v1beta1/pod_disruption_budget.rs b/src/v1_14/api/policy/v1beta1/pod_disruption_budget.rs index 58fa0ca1f4..89e83659d6 100644 --- a/src/v1_14/api/policy/v1beta1/pod_disruption_budget.rs +++ b/src/v1_14/api/policy/v1beta1/pod_disruption_budget.rs @@ -32,6 +32,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_disruption_budget( namespace: &str, body: &crate::v1_14::api::policy::v1beta1::PodDisruptionBudget, @@ -68,6 +69,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_14::api::policy::v1beta1::PodDisruptionBudget), @@ -87,6 +90,7 @@ pub enum CreateNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -152,6 +156,7 @@ impl PodDisruptionBudget { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_disruption_budget( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -175,6 +180,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_collection_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -182,6 +188,7 @@ pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -265,6 +273,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -273,6 +282,7 @@ pub enum DeleteNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -341,6 +351,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -362,12 +373,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_14::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -411,6 +424,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_disruption_budget_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -429,12 +443,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_14::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -486,6 +502,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -515,12 +532,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_14::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -572,6 +591,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -601,12 +621,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_14::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -656,6 +678,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -692,6 +715,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -703,12 +727,14 @@ pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_14::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -758,6 +784,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -786,6 +813,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -793,12 +821,14 @@ pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_14::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -850,6 +880,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -888,6 +919,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -899,6 +931,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_14::api::policy::v1beta1::PodDisruptionBudget), @@ -906,6 +939,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -965,6 +999,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -1003,6 +1038,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1014,6 +1050,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_14::api::policy::v1beta1::PodDisruptionBudget), @@ -1021,6 +1058,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1076,6 +1114,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -1097,12 +1136,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1148,6 +1189,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_disruption_budget_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1166,12 +1208,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/policy/v1beta1/pod_security_policy.rs b/src/v1_14/api/policy/v1beta1/pod_security_policy.rs index b2d26b57ff..2e972245de 100644 --- a/src/v1_14/api/policy/v1beta1/pod_security_policy.rs +++ b/src/v1_14/api/policy/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_14::api::policy::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -59,6 +60,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_14::api::policy::v1beta1::PodSecurityPolicy), @@ -78,6 +81,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -159,6 +164,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_14::api::policy::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_14::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -498,6 +515,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_14::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_14::api::policy::v1beta1::PodSecurityPolicy, @@ -598,6 +619,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_14::api::policy::v1beta1::PodSecurityPolicy), @@ -616,6 +639,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1/cluster_role.rs b/src/v1_14/api/rbac/v1/cluster_role.rs index 06a6b358ff..b7c69abbc7 100644 --- a/src/v1_14/api/rbac/v1/cluster_role.rs +++ b/src/v1_14/api/rbac/v1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_14::api::rbac::v1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_14::api::rbac::v1::ClusterRole, @@ -589,6 +610,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1::ClusterRole), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1/cluster_role_binding.rs b/src/v1_14/api/rbac/v1/cluster_role_binding.rs index af611f9845..f5a59def16 100644 --- a/src/v1_14/api/rbac/v1/cluster_role_binding.rs +++ b/src/v1_14/api/rbac/v1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_14::api::rbac::v1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_14::api::rbac::v1::ClusterRoleBinding, @@ -589,6 +610,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1::ClusterRoleBinding), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1/mod.rs b/src/v1_14/api/rbac/v1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_14/api/rbac/v1/mod.rs +++ b/src/v1_14/api/rbac/v1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_14/api/rbac/v1/role.rs b/src/v1_14/api/rbac/v1/role.rs index 9668dff378..8521d9a111 100644 --- a/src/v1_14/api/rbac/v1/role.rs +++ b/src/v1_14/api/rbac/v1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_14::api::rbac::v1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_14::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -698,6 +722,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -709,6 +734,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1::Role), @@ -716,6 +742,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +798,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -792,12 +820,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -843,6 +873,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -861,12 +892,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1/role_binding.rs b/src/v1_14/api/rbac/v1/role_binding.rs index b91aebf823..046f1545e7 100644 --- a/src/v1_14/api/rbac/v1/role_binding.rs +++ b/src/v1_14/api/rbac/v1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_14::api::rbac::v1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_14::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -701,6 +725,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -712,6 +737,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1::RoleBinding), @@ -719,6 +745,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +801,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -795,12 +823,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -846,6 +876,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -864,12 +895,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1alpha1/cluster_role.rs b/src/v1_14/api/rbac/v1alpha1/cluster_role.rs index 58d7df7f67..ee5e4339cb 100644 --- a/src/v1_14/api/rbac/v1alpha1/cluster_role.rs +++ b/src/v1_14/api/rbac/v1alpha1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_14::api::rbac::v1alpha1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1alpha1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1alpha1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_14::api::rbac::v1alpha1::ClusterRole, @@ -589,6 +610,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1alpha1::ClusterRole), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1alpha1/cluster_role_binding.rs b/src/v1_14/api/rbac/v1alpha1/cluster_role_binding.rs index 3bdaaa4fbb..cd7dea0c91 100644 --- a/src/v1_14/api/rbac/v1alpha1/cluster_role_binding.rs +++ b/src/v1_14/api/rbac/v1alpha1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_14::api::rbac::v1alpha1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1alpha1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1alpha1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_14::api::rbac::v1alpha1::ClusterRoleBinding, @@ -589,6 +610,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1alpha1::ClusterRoleBinding), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1alpha1/mod.rs b/src/v1_14/api/rbac/v1alpha1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_14/api/rbac/v1alpha1/mod.rs +++ b/src/v1_14/api/rbac/v1alpha1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_14/api/rbac/v1alpha1/role.rs b/src/v1_14/api/rbac/v1alpha1/role.rs index 23b4f9b6e3..24f7af993a 100644 --- a/src/v1_14/api/rbac/v1alpha1/role.rs +++ b/src/v1_14/api/rbac/v1alpha1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_14::api::rbac::v1alpha1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1alpha1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_14::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -698,6 +722,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -709,6 +734,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1alpha1::Role), @@ -716,6 +742,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +798,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -792,12 +820,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -843,6 +873,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -861,12 +892,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1alpha1/role_binding.rs b/src/v1_14/api/rbac/v1alpha1/role_binding.rs index be39fb77db..e267a90ed4 100644 --- a/src/v1_14/api/rbac/v1alpha1/role_binding.rs +++ b/src/v1_14/api/rbac/v1alpha1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_14::api::rbac::v1alpha1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1alpha1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_14::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -701,6 +725,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -712,6 +737,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1alpha1::RoleBinding), @@ -719,6 +745,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +801,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -795,12 +823,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -846,6 +876,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -864,12 +895,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1beta1/cluster_role.rs b/src/v1_14/api/rbac/v1beta1/cluster_role.rs index f688e95517..e82c39d1d1 100644 --- a/src/v1_14/api/rbac/v1beta1/cluster_role.rs +++ b/src/v1_14/api/rbac/v1beta1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_14::api::rbac::v1beta1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1beta1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1beta1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_14::api::rbac::v1beta1::ClusterRole, @@ -589,6 +610,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_14::api::rbac::v1beta1::ClusterRole), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1beta1/cluster_role_binding.rs b/src/v1_14/api/rbac/v1beta1/cluster_role_binding.rs index 1b2d42f5e7..f80dd46762 100644 --- a/src/v1_14/api/rbac/v1beta1/cluster_role_binding.rs +++ b/src/v1_14/api/rbac/v1beta1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_14::api::rbac::v1beta1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1beta1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1beta1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_14::api::rbac::v1beta1::ClusterRoleBinding, @@ -589,6 +610,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1beta1::ClusterRoleBinding), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1beta1/mod.rs b/src/v1_14/api/rbac/v1beta1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_14/api/rbac/v1beta1/mod.rs +++ b/src/v1_14/api/rbac/v1beta1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_14/api/rbac/v1beta1/role.rs b/src/v1_14/api/rbac/v1beta1/role.rs index 9a23ba1818..88f9543173 100644 --- a/src/v1_14/api/rbac/v1beta1/role.rs +++ b/src/v1_14/api/rbac/v1beta1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_14::api::rbac::v1beta1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1beta1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_14::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -698,6 +722,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -709,6 +734,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_14::api::rbac::v1beta1::Role), @@ -716,6 +742,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +798,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -792,12 +820,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -843,6 +873,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -861,12 +892,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/rbac/v1beta1/role_binding.rs b/src/v1_14/api/rbac/v1beta1/role_binding.rs index eb5971c94a..7e4dbdfa0b 100644 --- a/src/v1_14/api/rbac/v1beta1/role_binding.rs +++ b/src/v1_14/api/rbac/v1beta1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_14::api::rbac::v1beta1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1beta1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_14::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -701,6 +725,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -712,6 +737,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_14::api::rbac::v1beta1::RoleBinding), @@ -719,6 +745,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +801,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -795,12 +823,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -846,6 +876,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -864,12 +895,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/scheduling/v1/mod.rs b/src/v1_14/api/scheduling/v1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_14/api/scheduling/v1/mod.rs +++ b/src/v1_14/api/scheduling/v1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_14/api/scheduling/v1/priority_class.rs b/src/v1_14/api/scheduling/v1/priority_class.rs index 8c00ad9b92..3b991842d8 100644 --- a/src/v1_14/api/scheduling/v1/priority_class.rs +++ b/src/v1_14/api/scheduling/v1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_14::api::scheduling::v1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -65,6 +66,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -76,6 +78,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1::PriorityClass), @@ -84,6 +87,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -145,6 +149,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -165,6 +170,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -172,6 +178,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -249,6 +257,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -257,6 +266,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -339,12 +350,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -392,6 +405,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -419,12 +433,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -470,6 +486,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -504,6 +521,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -515,12 +533,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +588,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_14::api::scheduling::v1::PriorityClass, @@ -604,6 +625,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -615,6 +637,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1::PriorityClass), @@ -622,6 +645,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -673,6 +697,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -691,12 +716,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/scheduling/v1alpha1/mod.rs b/src/v1_14/api/scheduling/v1alpha1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_14/api/scheduling/v1alpha1/mod.rs +++ b/src/v1_14/api/scheduling/v1alpha1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_14/api/scheduling/v1alpha1/priority_class.rs b/src/v1_14/api/scheduling/v1alpha1/priority_class.rs index 3f1d405a52..80d5fd7055 100644 --- a/src/v1_14/api/scheduling/v1alpha1/priority_class.rs +++ b/src/v1_14/api/scheduling/v1alpha1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_14::api::scheduling::v1alpha1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -65,6 +66,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -76,6 +78,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1alpha1::PriorityClass), @@ -84,6 +87,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -145,6 +149,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -165,6 +170,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -172,6 +178,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -249,6 +257,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -257,6 +266,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -339,12 +350,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1alpha1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -392,6 +405,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -419,12 +433,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -470,6 +486,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -504,6 +521,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -515,12 +533,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +588,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_14::api::scheduling::v1alpha1::PriorityClass, @@ -604,6 +625,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -615,6 +637,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1alpha1::PriorityClass), @@ -622,6 +645,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -673,6 +697,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -691,12 +716,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/scheduling/v1beta1/mod.rs b/src/v1_14/api/scheduling/v1beta1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_14/api/scheduling/v1beta1/mod.rs +++ b/src/v1_14/api/scheduling/v1beta1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_14/api/scheduling/v1beta1/priority_class.rs b/src/v1_14/api/scheduling/v1beta1/priority_class.rs index d43750a2b4..55f450c30c 100644 --- a/src/v1_14/api/scheduling/v1beta1/priority_class.rs +++ b/src/v1_14/api/scheduling/v1beta1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_14::api::scheduling::v1beta1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -65,6 +66,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -76,6 +78,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1beta1::PriorityClass), @@ -84,6 +87,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -145,6 +149,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -165,6 +170,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -172,6 +178,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -249,6 +257,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -257,6 +266,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -339,12 +350,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1beta1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -392,6 +405,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -419,12 +433,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1beta1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -470,6 +486,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -504,6 +521,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -515,12 +533,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1beta1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +588,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_14::api::scheduling::v1beta1::PriorityClass, @@ -604,6 +625,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -615,6 +637,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_14::api::scheduling::v1beta1::PriorityClass), @@ -622,6 +645,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -673,6 +697,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -691,12 +716,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/settings/v1alpha1/mod.rs b/src/v1_14/api/settings/v1alpha1/mod.rs index f0ebd9df12..7816e600a8 100644 --- a/src/v1_14/api/settings/v1alpha1/mod.rs +++ b/src/v1_14/api/settings/v1alpha1/mod.rs @@ -1,25 +1,19 @@ mod pod_preset; -pub use self::pod_preset::{ - PodPreset, - CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse, - DeleteCollectionNamespacedPodPresetResponse, - DeleteNamespacedPodPresetResponse, - ListNamespacedPodPresetResponse, - ListPodPresetForAllNamespacesResponse, - PatchNamespacedPodPresetResponse, - ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse, - ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse, - WatchNamespacedPodPresetResponse, - WatchPodPresetForAllNamespacesResponse, -}; +pub use self::pod_preset::PodPreset; +#[cfg(feature = "api")] pub use self::pod_preset::{CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteCollectionNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListPodPresetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_preset::PatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::{ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::{ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::WatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::WatchPodPresetForAllNamespacesResponse; mod pod_preset_list; -pub use self::pod_preset_list::{ - PodPresetList, -}; +pub use self::pod_preset_list::PodPresetList; mod pod_preset_spec; -pub use self::pod_preset_spec::{ - PodPresetSpec, -}; +pub use self::pod_preset_spec::PodPresetSpec; diff --git a/src/v1_14/api/settings/v1alpha1/pod_preset.rs b/src/v1_14/api/settings/v1alpha1/pod_preset.rs index 53808d7588..379b87012c 100644 --- a/src/v1_14/api/settings/v1alpha1/pod_preset.rs +++ b/src/v1_14/api/settings/v1alpha1/pod_preset.rs @@ -28,6 +28,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_preset( namespace: &str, body: &crate::v1_14::api::settings::v1alpha1::PodPreset, @@ -64,6 +65,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodPresetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodPresetResponse { Ok(crate::v1_14::api::settings::v1alpha1::PodPreset), @@ -83,6 +86,7 @@ pub enum CreateNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -148,6 +152,7 @@ impl PodPreset { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_preset( namespace: &str, delete_optional: crate::v1_14::DeleteOptional<'_>, @@ -171,6 +176,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_collection_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodPresetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -178,6 +184,7 @@ pub enum DeleteCollectionNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -240,6 +247,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_preset( name: &str, namespace: &str, @@ -261,6 +269,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodPresetResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -269,6 +278,7 @@ pub enum DeleteNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -337,6 +347,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_preset( namespace: &str, optional: crate::v1_14::ListOptional<'_>, @@ -358,12 +369,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodPresetResponse { Ok(crate::v1_14::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -407,6 +420,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_preset_for_all_namespaces( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -425,12 +439,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodPresetForAllNamespacesResponse { Ok(crate::v1_14::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -482,6 +498,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_preset( name: &str, namespace: &str, @@ -511,12 +528,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::patch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodPresetResponse { Ok(crate::v1_14::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -566,6 +585,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_preset( name: &str, namespace: &str, @@ -602,6 +622,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodPresetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -613,12 +634,14 @@ pub struct ReadNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodPresetResponse { Ok(crate::v1_14::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -670,6 +693,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_preset( name: &str, namespace: &str, @@ -708,6 +732,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodPresetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -719,6 +744,7 @@ pub struct ReplaceNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodPresetResponse { Ok(crate::v1_14::api::settings::v1alpha1::PodPreset), @@ -726,6 +752,7 @@ pub enum ReplaceNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -781,6 +808,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_preset( namespace: &str, optional: crate::v1_14::WatchOptional<'_>, @@ -802,12 +830,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodPresetResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_preset_for_all_namespaces( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -871,12 +902,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodPresetForAllNamespacesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/storage/v1/mod.rs b/src/v1_14/api/storage/v1/mod.rs index 57aca76186..09616e1c54 100644 --- a/src/v1_14/api/storage/v1/mod.rs +++ b/src/v1_14/api/storage/v1/mod.rs @@ -1,59 +1,43 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - PatchVolumeAttachmentStatusResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReadVolumeAttachmentStatusOptional, ReadVolumeAttachmentStatusResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - ReplaceVolumeAttachmentStatusOptional, ReplaceVolumeAttachmentStatusResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentStatusResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentStatusOptional, ReadVolumeAttachmentStatusResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentStatusOptional, ReplaceVolumeAttachmentStatusResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_14/api/storage/v1/storage_class.rs b/src/v1_14/api/storage/v1/storage_class.rs index db57d1599b..b62209ac6c 100644 --- a/src/v1_14/api/storage/v1/storage_class.rs +++ b/src/v1_14/api/storage/v1/storage_class.rs @@ -46,6 +46,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_14::api::storage::v1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -79,6 +80,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -90,6 +92,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_14::api::storage::v1::StorageClass), @@ -98,6 +101,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -159,6 +163,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -179,6 +184,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -263,6 +271,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_14::api::storage::v1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -433,12 +447,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_14::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -518,6 +535,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -529,12 +547,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_14::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -582,6 +602,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_14::api::storage::v1::StorageClass, @@ -618,6 +639,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -629,6 +651,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_14::api::storage::v1::StorageClass), @@ -636,6 +659,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -687,6 +711,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -705,12 +730,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/storage/v1/volume_attachment.rs b/src/v1_14/api/storage/v1/volume_attachment.rs index b2437f0889..27d323bd0d 100644 --- a/src/v1_14/api/storage/v1/volume_attachment.rs +++ b/src/v1_14/api/storage/v1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_14::api::storage::v1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -64,6 +65,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1::VolumeAttachment), @@ -83,6 +86,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -164,6 +169,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -338,12 +349,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -418,12 +432,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -471,6 +487,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment_status( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -498,12 +515,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentStatusResponse { Ok(crate::v1_14::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -549,6 +568,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -583,6 +603,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -594,12 +615,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -645,6 +668,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment_status( name: &str, optional: ReadVolumeAttachmentStatusOptional<'_>, @@ -671,6 +695,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -678,12 +703,14 @@ pub struct ReadVolumeAttachmentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentStatusResponse { Ok(crate::v1_14::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -731,6 +758,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_14::api::storage::v1::VolumeAttachment, @@ -767,6 +795,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -778,6 +807,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1::VolumeAttachment), @@ -785,6 +815,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +871,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment_status( name: &str, body: &crate::v1_14::api::storage::v1::VolumeAttachment, @@ -876,6 +908,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -887,6 +920,7 @@ pub struct ReplaceVolumeAttachmentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentStatusResponse { Ok(crate::v1_14::api::storage::v1::VolumeAttachment), @@ -894,6 +928,7 @@ pub enum ReplaceVolumeAttachmentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -945,6 +980,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -963,12 +999,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/storage/v1alpha1/mod.rs b/src/v1_14/api/storage/v1alpha1/mod.rs index a5eefeed6c..4b5a7d41ec 100644 --- a/src/v1_14/api/storage/v1alpha1/mod.rs +++ b/src/v1_14/api/storage/v1alpha1/mod.rs @@ -1,38 +1,26 @@ mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_14/api/storage/v1alpha1/volume_attachment.rs b/src/v1_14/api/storage/v1alpha1/volume_attachment.rs index d3ead26a47..f531db197d 100644 --- a/src/v1_14/api/storage/v1alpha1/volume_attachment.rs +++ b/src/v1_14/api/storage/v1alpha1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_14::api::storage::v1alpha1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -64,6 +65,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1alpha1::VolumeAttachment), @@ -83,6 +86,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -164,6 +169,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -338,12 +349,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1alpha1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -418,12 +432,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -503,6 +520,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -514,12 +532,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -567,6 +587,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_14::api::storage::v1alpha1::VolumeAttachment, @@ -603,6 +624,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -614,6 +636,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1alpha1::VolumeAttachment), @@ -621,6 +644,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +696,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -690,12 +715,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/storage/v1beta1/csi_driver.rs b/src/v1_14/api/storage/v1beta1/csi_driver.rs index dad014361d..0dce859d03 100644 --- a/src/v1_14/api/storage/v1beta1/csi_driver.rs +++ b/src/v1_14/api/storage/v1beta1/csi_driver.rs @@ -26,6 +26,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_csi_driver( body: &crate::v1_14::api::storage::v1beta1::CSIDriver, optional: CreateCSIDriverOptional<'_>, @@ -59,6 +60,7 @@ impl CSIDriver { } /// Optional parameters of [`CSIDriver::create_csi_driver`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCSIDriverOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateCSIDriverOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::create_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCSIDriverResponse { Ok(crate::v1_14::api::storage::v1beta1::CSIDriver), @@ -78,6 +81,7 @@ pub enum CreateCSIDriverResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_csi_driver( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -158,6 +163,7 @@ impl CSIDriver { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::delete_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCSIDriverResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCSIDriverResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -232,6 +239,7 @@ impl CSIDriver { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_csi_driver( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -252,6 +260,7 @@ impl CSIDriver { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::delete_collection_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCSIDriverResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -259,6 +268,7 @@ pub enum DeleteCollectionCSIDriverResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_csi_driver( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl CSIDriver { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::list_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCSIDriverResponse { Ok(crate::v1_14::api::storage::v1beta1::CSIDriverList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_csi_driver( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl CSIDriver { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::patch_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCSIDriverResponse { Ok(crate::v1_14::api::storage::v1beta1::CSIDriver), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_csi_driver( name: &str, optional: ReadCSIDriverOptional<'_>, @@ -498,6 +515,7 @@ impl CSIDriver { } /// Optional parameters of [`CSIDriver::read_csi_driver`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCSIDriverOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadCSIDriverOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::read_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCSIDriverResponse { Ok(crate::v1_14::api::storage::v1beta1::CSIDriver), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_csi_driver( name: &str, body: &crate::v1_14::api::storage::v1beta1::CSIDriver, @@ -598,6 +619,7 @@ impl CSIDriver { } /// Optional parameters of [`CSIDriver::replace_csi_driver`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCSIDriverOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceCSIDriverOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::replace_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCSIDriverResponse { Ok(crate::v1_14::api::storage::v1beta1::CSIDriver), @@ -616,6 +639,7 @@ pub enum ReplaceCSIDriverResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_csi_driver( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl CSIDriver { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::watch_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCSIDriverResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/storage/v1beta1/csi_node.rs b/src/v1_14/api/storage/v1beta1/csi_node.rs index e684507121..a508aa17c3 100644 --- a/src/v1_14/api/storage/v1beta1/csi_node.rs +++ b/src/v1_14/api/storage/v1beta1/csi_node.rs @@ -26,6 +26,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_csi_node( body: &crate::v1_14::api::storage::v1beta1::CSINode, optional: CreateCSINodeOptional<'_>, @@ -59,6 +60,7 @@ impl CSINode { } /// Optional parameters of [`CSINode::create_csi_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCSINodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateCSINodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::create_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCSINodeResponse { Ok(crate::v1_14::api::storage::v1beta1::CSINode), @@ -78,6 +81,7 @@ pub enum CreateCSINodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_csi_node( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -158,6 +163,7 @@ impl CSINode { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::delete_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCSINodeResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCSINodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -232,6 +239,7 @@ impl CSINode { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_csi_node( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -252,6 +260,7 @@ impl CSINode { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::delete_collection_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCSINodeResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -259,6 +268,7 @@ pub enum DeleteCollectionCSINodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_csi_node( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl CSINode { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::list_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCSINodeResponse { Ok(crate::v1_14::api::storage::v1beta1::CSINodeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_csi_node( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl CSINode { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::patch_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCSINodeResponse { Ok(crate::v1_14::api::storage::v1beta1::CSINode), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_csi_node( name: &str, optional: ReadCSINodeOptional<'_>, @@ -498,6 +515,7 @@ impl CSINode { } /// Optional parameters of [`CSINode::read_csi_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCSINodeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadCSINodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::read_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCSINodeResponse { Ok(crate::v1_14::api::storage::v1beta1::CSINode), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_csi_node( name: &str, body: &crate::v1_14::api::storage::v1beta1::CSINode, @@ -598,6 +619,7 @@ impl CSINode { } /// Optional parameters of [`CSINode::replace_csi_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCSINodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceCSINodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::replace_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCSINodeResponse { Ok(crate::v1_14::api::storage::v1beta1::CSINode), @@ -616,6 +639,7 @@ pub enum ReplaceCSINodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_csi_node( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl CSINode { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::watch_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCSINodeResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/storage/v1beta1/mod.rs b/src/v1_14/api/storage/v1beta1/mod.rs index 265b8b7dcf..a5d5454671 100644 --- a/src/v1_14/api/storage/v1beta1/mod.rs +++ b/src/v1_14/api/storage/v1beta1/mod.rs @@ -1,107 +1,77 @@ mod csi_driver; -pub use self::csi_driver::{ - CSIDriver, - CreateCSIDriverOptional, CreateCSIDriverResponse, - DeleteCSIDriverResponse, - DeleteCollectionCSIDriverResponse, - ListCSIDriverResponse, - PatchCSIDriverResponse, - ReadCSIDriverOptional, ReadCSIDriverResponse, - ReplaceCSIDriverOptional, ReplaceCSIDriverResponse, - WatchCSIDriverResponse, -}; +pub use self::csi_driver::CSIDriver; +#[cfg(feature = "api")] pub use self::csi_driver::{CreateCSIDriverOptional, CreateCSIDriverResponse}; +#[cfg(feature = "api")] pub use self::csi_driver::DeleteCSIDriverResponse; +#[cfg(feature = "api")] pub use self::csi_driver::DeleteCollectionCSIDriverResponse; +#[cfg(feature = "api")] pub use self::csi_driver::ListCSIDriverResponse; +#[cfg(feature = "api")] pub use self::csi_driver::PatchCSIDriverResponse; +#[cfg(feature = "api")] pub use self::csi_driver::{ReadCSIDriverOptional, ReadCSIDriverResponse}; +#[cfg(feature = "api")] pub use self::csi_driver::{ReplaceCSIDriverOptional, ReplaceCSIDriverResponse}; +#[cfg(feature = "api")] pub use self::csi_driver::WatchCSIDriverResponse; mod csi_driver_list; -pub use self::csi_driver_list::{ - CSIDriverList, -}; +pub use self::csi_driver_list::CSIDriverList; mod csi_driver_spec; -pub use self::csi_driver_spec::{ - CSIDriverSpec, -}; +pub use self::csi_driver_spec::CSIDriverSpec; mod csi_node; -pub use self::csi_node::{ - CSINode, - CreateCSINodeOptional, CreateCSINodeResponse, - DeleteCSINodeResponse, - DeleteCollectionCSINodeResponse, - ListCSINodeResponse, - PatchCSINodeResponse, - ReadCSINodeOptional, ReadCSINodeResponse, - ReplaceCSINodeOptional, ReplaceCSINodeResponse, - WatchCSINodeResponse, -}; +pub use self::csi_node::CSINode; +#[cfg(feature = "api")] pub use self::csi_node::{CreateCSINodeOptional, CreateCSINodeResponse}; +#[cfg(feature = "api")] pub use self::csi_node::DeleteCSINodeResponse; +#[cfg(feature = "api")] pub use self::csi_node::DeleteCollectionCSINodeResponse; +#[cfg(feature = "api")] pub use self::csi_node::ListCSINodeResponse; +#[cfg(feature = "api")] pub use self::csi_node::PatchCSINodeResponse; +#[cfg(feature = "api")] pub use self::csi_node::{ReadCSINodeOptional, ReadCSINodeResponse}; +#[cfg(feature = "api")] pub use self::csi_node::{ReplaceCSINodeOptional, ReplaceCSINodeResponse}; +#[cfg(feature = "api")] pub use self::csi_node::WatchCSINodeResponse; mod csi_node_driver; -pub use self::csi_node_driver::{ - CSINodeDriver, -}; +pub use self::csi_node_driver::CSINodeDriver; mod csi_node_list; -pub use self::csi_node_list::{ - CSINodeList, -}; +pub use self::csi_node_list::CSINodeList; mod csi_node_spec; -pub use self::csi_node_spec::{ - CSINodeSpec, -}; +pub use self::csi_node_spec::CSINodeSpec; mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_14/api/storage/v1beta1/storage_class.rs b/src/v1_14/api/storage/v1beta1/storage_class.rs index 74610c2e9c..9a6b4feca0 100644 --- a/src/v1_14/api/storage/v1beta1/storage_class.rs +++ b/src/v1_14/api/storage/v1beta1/storage_class.rs @@ -46,6 +46,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_14::api::storage::v1beta1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -79,6 +80,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -90,6 +92,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_14::api::storage::v1beta1::StorageClass), @@ -98,6 +101,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -159,6 +163,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -179,6 +184,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -263,6 +271,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_14::api::storage::v1beta1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -433,12 +447,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_14::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -518,6 +535,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -529,12 +547,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_14::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -582,6 +602,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_14::api::storage::v1beta1::StorageClass, @@ -618,6 +639,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -629,6 +651,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_14::api::storage::v1beta1::StorageClass), @@ -636,6 +659,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -687,6 +711,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -705,12 +730,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/api/storage/v1beta1/volume_attachment.rs b/src/v1_14/api/storage/v1beta1/volume_attachment.rs index 82f97e4512..4a24120b18 100644 --- a/src/v1_14/api/storage/v1beta1/volume_attachment.rs +++ b/src/v1_14/api/storage/v1beta1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_14::api::storage::v1beta1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -64,6 +65,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1beta1::VolumeAttachment), @@ -83,6 +86,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -164,6 +169,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -338,12 +349,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1beta1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -418,12 +432,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -503,6 +520,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -514,12 +532,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -567,6 +587,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_14::api::storage::v1beta1::VolumeAttachment, @@ -603,6 +624,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -614,6 +636,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_14::api::storage::v1beta1::VolumeAttachment), @@ -621,6 +644,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +696,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -690,12 +715,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs b/src/v1_14/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs index 1eda4adede..fe2058225e 100644 --- a/src/v1_14/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs +++ b/src/v1_14/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs @@ -28,6 +28,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_custom_resource_definition( body: &crate::v1_14::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, optional: CreateCustomResourceDefinitionOptional<'_>, @@ -61,6 +62,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCustomResourceDefinitionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCustomResourceDefinitionResponse { Ok(crate::v1_14::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -80,6 +83,7 @@ pub enum CreateCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CustomResourceDefinition { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_custom_resource_definition( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -161,6 +166,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_collection_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCustomResourceDefinitionResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -226,6 +233,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_custom_resource_definition( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -245,6 +253,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCustomResourceDefinitionResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -253,6 +262,7 @@ pub enum DeleteCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_custom_resource_definition( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::list_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCustomResourceDefinitionResponse { Ok(crate::v1_14::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinitionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionResponse { Ok(crate::v1_14::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition_status( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionStatusResponse { Ok(crate::v1_14::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition( name: &str, optional: ReadCustomResourceDefinitionOptional<'_>, @@ -580,6 +600,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -591,12 +612,14 @@ pub struct ReadCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionResponse { Ok(crate::v1_14::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition_status( name: &str, optional: ReadCustomResourceDefinitionStatusOptional<'_>, @@ -668,6 +692,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionStatusResponse { Ok(crate::v1_14::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition( name: &str, body: &crate::v1_14::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -764,6 +792,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -775,6 +804,7 @@ pub struct ReplaceCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionResponse { Ok(crate::v1_14::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -782,6 +812,7 @@ pub enum ReplaceCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +868,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition_status( name: &str, body: &crate::v1_14::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -873,6 +905,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -884,6 +917,7 @@ pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionStatusResponse { Ok(crate::v1_14::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -891,6 +925,7 @@ pub enum ReplaceCustomResourceDefinitionStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -942,6 +977,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_custom_resource_definition( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -960,12 +996,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::watch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCustomResourceDefinitionResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs b/src/v1_14/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs index df135d45fe..3c0069e78d 100644 --- a/src/v1_14/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs +++ b/src/v1_14/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs @@ -1,116 +1,74 @@ mod custom_resource_column_definition; -pub use self::custom_resource_column_definition::{ - CustomResourceColumnDefinition, -}; +pub use self::custom_resource_column_definition::CustomResourceColumnDefinition; mod custom_resource_conversion; -pub use self::custom_resource_conversion::{ - CustomResourceConversion, -}; +pub use self::custom_resource_conversion::CustomResourceConversion; mod custom_resource_definition; -pub use self::custom_resource_definition::{ - CustomResourceDefinition, - CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse, - DeleteCollectionCustomResourceDefinitionResponse, - DeleteCustomResourceDefinitionResponse, - ListCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionStatusResponse, - ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse, - ReadCustomResourceDefinitionStatusOptional, ReadCustomResourceDefinitionStatusResponse, - ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse, - ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse, - WatchCustomResourceDefinitionResponse, -}; +pub use self::custom_resource_definition::CustomResourceDefinition; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCollectionCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::ListCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionStatusResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionStatusOptional, ReadCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::WatchCustomResourceDefinitionResponse; mod custom_resource_definition_condition; -pub use self::custom_resource_definition_condition::{ - CustomResourceDefinitionCondition, -}; +pub use self::custom_resource_definition_condition::CustomResourceDefinitionCondition; mod custom_resource_definition_list; -pub use self::custom_resource_definition_list::{ - CustomResourceDefinitionList, -}; +pub use self::custom_resource_definition_list::CustomResourceDefinitionList; mod custom_resource_definition_names; -pub use self::custom_resource_definition_names::{ - CustomResourceDefinitionNames, -}; +pub use self::custom_resource_definition_names::CustomResourceDefinitionNames; mod custom_resource_definition_spec; -pub use self::custom_resource_definition_spec::{ - CustomResourceDefinitionSpec, -}; +pub use self::custom_resource_definition_spec::CustomResourceDefinitionSpec; mod custom_resource_definition_status; -pub use self::custom_resource_definition_status::{ - CustomResourceDefinitionStatus, -}; +pub use self::custom_resource_definition_status::CustomResourceDefinitionStatus; mod custom_resource_definition_version; -pub use self::custom_resource_definition_version::{ - CustomResourceDefinitionVersion, -}; +pub use self::custom_resource_definition_version::CustomResourceDefinitionVersion; mod custom_resource_subresource_scale; -pub use self::custom_resource_subresource_scale::{ - CustomResourceSubresourceScale, -}; +pub use self::custom_resource_subresource_scale::CustomResourceSubresourceScale; mod custom_resource_subresource_status; -pub use self::custom_resource_subresource_status::{ - CustomResourceSubresourceStatus, -}; +pub use self::custom_resource_subresource_status::CustomResourceSubresourceStatus; mod custom_resource_subresources; -pub use self::custom_resource_subresources::{ - CustomResourceSubresources, -}; +pub use self::custom_resource_subresources::CustomResourceSubresources; mod custom_resource_validation; -pub use self::custom_resource_validation::{ - CustomResourceValidation, -}; +pub use self::custom_resource_validation::CustomResourceValidation; mod external_documentation; -pub use self::external_documentation::{ - ExternalDocumentation, -}; +pub use self::external_documentation::ExternalDocumentation; mod json; -pub use self::json::{ - JSON, -}; +pub use self::json::JSON; mod json_schema_props; -pub use self::json_schema_props::{ - JSONSchemaProps, -}; +pub use self::json_schema_props::JSONSchemaProps; mod json_schema_props_or_array; -pub use self::json_schema_props_or_array::{ - JSONSchemaPropsOrArray, -}; +pub use self::json_schema_props_or_array::JSONSchemaPropsOrArray; mod json_schema_props_or_bool; -pub use self::json_schema_props_or_bool::{ - JSONSchemaPropsOrBool, -}; +pub use self::json_schema_props_or_bool::JSONSchemaPropsOrBool; mod json_schema_props_or_string_array; -pub use self::json_schema_props_or_string_array::{ - JSONSchemaPropsOrStringArray, -}; +pub use self::json_schema_props_or_string_array::JSONSchemaPropsOrStringArray; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; diff --git a/src/v1_14/apimachinery/pkg/api/resource/mod.rs b/src/v1_14/apimachinery/pkg/api/resource/mod.rs index 352925b923..629eeca5bc 100644 --- a/src/v1_14/apimachinery/pkg/api/resource/mod.rs +++ b/src/v1_14/apimachinery/pkg/api/resource/mod.rs @@ -1,5 +1,3 @@ mod quantity; -pub use self::quantity::{ - Quantity, -}; +pub use self::quantity::Quantity; diff --git a/src/v1_14/apimachinery/pkg/apis/meta/v1/mod.rs b/src/v1_14/apimachinery/pkg/apis/meta/v1/mod.rs index 553358492b..50fc82f97c 100644 --- a/src/v1_14/apimachinery/pkg/apis/meta/v1/mod.rs +++ b/src/v1_14/apimachinery/pkg/apis/meta/v1/mod.rs @@ -1,125 +1,75 @@ mod api_group; -pub use self::api_group::{ - APIGroup, -}; +pub use self::api_group::APIGroup; mod api_group_list; -pub use self::api_group_list::{ - APIGroupList, -}; +pub use self::api_group_list::APIGroupList; mod api_resource; -pub use self::api_resource::{ - APIResource, -}; +pub use self::api_resource::APIResource; mod api_resource_list; -pub use self::api_resource_list::{ - APIResourceList, -}; +pub use self::api_resource_list::APIResourceList; mod api_versions; -pub use self::api_versions::{ - APIVersions, -}; +pub use self::api_versions::APIVersions; mod delete_options; -pub use self::delete_options::{ - DeleteOptions, -}; +pub use self::delete_options::DeleteOptions; mod fields; -pub use self::fields::{ - Fields, -}; +pub use self::fields::Fields; mod group_version_for_discovery; -pub use self::group_version_for_discovery::{ - GroupVersionForDiscovery, -}; +pub use self::group_version_for_discovery::GroupVersionForDiscovery; mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializers; -pub use self::initializers::{ - Initializers, -}; +pub use self::initializers::Initializers; mod label_selector; -pub use self::label_selector::{ - LabelSelector, -}; +pub use self::label_selector::LabelSelector; mod label_selector_requirement; -pub use self::label_selector_requirement::{ - LabelSelectorRequirement, -}; +pub use self::label_selector_requirement::LabelSelectorRequirement; mod list_meta; -pub use self::list_meta::{ - ListMeta, -}; +pub use self::list_meta::ListMeta; mod managed_fields_entry; -pub use self::managed_fields_entry::{ - ManagedFieldsEntry, -}; +pub use self::managed_fields_entry::ManagedFieldsEntry; mod micro_time; -pub use self::micro_time::{ - MicroTime, -}; +pub use self::micro_time::MicroTime; mod object_meta; -pub use self::object_meta::{ - ObjectMeta, -}; +pub use self::object_meta::ObjectMeta; mod owner_reference; -pub use self::owner_reference::{ - OwnerReference, -}; +pub use self::owner_reference::OwnerReference; mod patch; -pub use self::patch::{ - Patch, -}; +pub use self::patch::Patch; mod preconditions; -pub use self::preconditions::{ - Preconditions, -}; +pub use self::preconditions::Preconditions; mod server_address_by_client_cidr; -pub use self::server_address_by_client_cidr::{ - ServerAddressByClientCIDR, -}; +pub use self::server_address_by_client_cidr::ServerAddressByClientCIDR; mod status; -pub use self::status::{ - Status, -}; +pub use self::status::Status; mod status_cause; -pub use self::status_cause::{ - StatusCause, -}; +pub use self::status_cause::StatusCause; mod status_details; -pub use self::status_details::{ - StatusDetails, -}; +pub use self::status_details::StatusDetails; mod time; -pub use self::time::{ - Time, -}; +pub use self::time::Time; mod watch_event; -pub use self::watch_event::{ - WatchEvent, -}; +pub use self::watch_event::WatchEvent; diff --git a/src/v1_14/apimachinery/pkg/runtime/mod.rs b/src/v1_14/apimachinery/pkg/runtime/mod.rs index 8614e1a158..eb2b8c0503 100644 --- a/src/v1_14/apimachinery/pkg/runtime/mod.rs +++ b/src/v1_14/apimachinery/pkg/runtime/mod.rs @@ -1,5 +1,3 @@ mod raw_extension; -pub use self::raw_extension::{ - RawExtension, -}; +pub use self::raw_extension::RawExtension; diff --git a/src/v1_14/apimachinery/pkg/util/intstr/mod.rs b/src/v1_14/apimachinery/pkg/util/intstr/mod.rs index 0d14f602e5..d3f7196121 100644 --- a/src/v1_14/apimachinery/pkg/util/intstr/mod.rs +++ b/src/v1_14/apimachinery/pkg/util/intstr/mod.rs @@ -1,5 +1,3 @@ mod int_or_string; -pub use self::int_or_string::{ - IntOrString, -}; +pub use self::int_or_string::IntOrString; diff --git a/src/v1_14/apimachinery/pkg/version/mod.rs b/src/v1_14/apimachinery/pkg/version/mod.rs index 540fa68d40..f125e577d1 100644 --- a/src/v1_14/apimachinery/pkg/version/mod.rs +++ b/src/v1_14/apimachinery/pkg/version/mod.rs @@ -1,5 +1,3 @@ mod info; -pub use self::info::{ - Info, -}; +pub use self::info::Info; diff --git a/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs b/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs index 2501d08958..2ac946a148 100644 --- a/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs +++ b/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -61,6 +62,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -80,6 +83,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -254,6 +262,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service_status( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceStatusResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -580,6 +600,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -591,12 +612,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service_status( name: &str, optional: ReadAPIServiceStatusOptional<'_>, @@ -668,6 +692,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceStatusResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -764,6 +792,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -775,6 +804,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -782,6 +812,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +868,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -873,6 +905,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -884,6 +917,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -891,6 +925,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -942,6 +977,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -960,12 +996,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs b/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs index f3c577aa5e..d210366939 100644 --- a/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs +++ b/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs @@ -1,41 +1,29 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - PatchAPIServiceStatusResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceStatusResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs b/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs index 1dbbfacbd3..dfb99e6079 100644 --- a/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs +++ b/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -61,6 +62,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -80,6 +83,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_14::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_14::DeleteOptional<'_>, list_optional: crate::v1_14::ListOptional<'_>, @@ -254,6 +262,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_14::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_14::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service_status( name: &str, body: &crate::v1_14::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceStatusResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -580,6 +600,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -591,12 +612,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service_status( name: &str, optional: ReadAPIServiceStatusOptional<'_>, @@ -668,6 +692,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceStatusResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -764,6 +792,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -775,6 +804,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -782,6 +812,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +868,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -873,6 +905,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -884,6 +917,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_14::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -891,6 +925,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -942,6 +977,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_14::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -960,12 +996,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs b/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs index f3c577aa5e..d210366939 100644 --- a/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs +++ b/src/v1_14/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs @@ -1,41 +1,29 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - PatchAPIServiceStatusResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceStatusResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_14/mod.rs b/src/v1_14/mod.rs index 4ea3ce93e5..d969ffadfe 100644 --- a/src/v1_14/mod.rs +++ b/src/v1_14/mod.rs @@ -1,23 +1,15 @@ mod delete_optional; -pub use self::delete_optional::{ - DeleteOptional, -}; +pub use self::delete_optional::DeleteOptional; mod list_optional; -pub use self::list_optional::{ - ListOptional, -}; +pub use self::list_optional::ListOptional; mod patch_optional; -pub use self::patch_optional::{ - PatchOptional, -}; +pub use self::patch_optional::PatchOptional; mod watch_optional; -pub use self::watch_optional::{ - WatchOptional, -}; +pub use self::watch_optional::WatchOptional; pub mod api; @@ -32,6 +24,7 @@ pub mod kube_aggregator; /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAPIVersionsResponse`]`>` constructor, or [`GetAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/".to_owned(); @@ -45,12 +38,14 @@ pub fn get_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAPIVersionsResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroupList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -85,6 +80,7 @@ impl crate::Response for GetAPIVersionsResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationAPIGroupResponse`]`>` constructor, or [`GetAdmissionregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/".to_owned(); @@ -98,12 +94,14 @@ pub fn get_admissionregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +136,7 @@ impl crate::Response for GetAdmissionregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1beta1/".to_owned(); @@ -151,12 +150,14 @@ pub fn get_admissionregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -191,6 +192,7 @@ impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsAPIGroupResponse`]`>` constructor, or [`GetApiextensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/".to_owned(); @@ -204,12 +206,14 @@ pub fn get_apiextensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +248,7 @@ impl crate::Response for GetApiextensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiextensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/v1beta1/".to_owned(); @@ -257,12 +262,14 @@ pub fn get_apiextensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +304,7 @@ impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationAPIGroupResponse`]`>` constructor, or [`GetApiregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/".to_owned(); @@ -310,12 +318,14 @@ pub fn get_apiregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +360,7 @@ impl crate::Response for GetApiregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1/".to_owned(); @@ -363,12 +374,14 @@ pub fn get_apiregistration_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -403,6 +416,7 @@ impl crate::Response for GetApiregistrationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1beta1/".to_owned(); @@ -416,12 +430,14 @@ pub fn get_apiregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -456,6 +472,7 @@ impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsAPIGroupResponse`]`>` constructor, or [`GetAppsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/".to_owned(); @@ -469,12 +486,14 @@ pub fn get_apps_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -509,6 +528,7 @@ impl crate::Response for GetAppsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1APIResourcesResponse`]`>` constructor, or [`GetAppsV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1/".to_owned(); @@ -522,12 +542,14 @@ pub fn get_apps_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +584,7 @@ impl crate::Response for GetAppsV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta1APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta1/".to_owned(); @@ -575,12 +598,14 @@ pub fn get_apps_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -615,6 +640,7 @@ impl crate::Response for GetAppsV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta2APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta2/".to_owned(); @@ -628,12 +654,14 @@ pub fn get_apps_v1beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta2APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +696,7 @@ impl crate::Response for GetAppsV1beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuditregistrationAPIGroupResponse`]`>` constructor, or [`GetAuditregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_auditregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/auditregistration.k8s.io/".to_owned(); @@ -681,12 +710,14 @@ pub fn get_auditregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_auditregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuditregistrationAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuditregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -721,6 +752,7 @@ impl crate::Response for GetAuditregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuditregistrationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetAuditregistrationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_auditregistration_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/auditregistration.k8s.io/v1alpha1/".to_owned(); @@ -734,12 +766,14 @@ pub fn get_auditregistration_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_auditregistration_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuditregistrationV1alpha1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuditregistrationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +808,7 @@ impl crate::Response for GetAuditregistrationV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationAPIGroupResponse`]`>` constructor, or [`GetAuthenticationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/".to_owned(); @@ -787,12 +822,14 @@ pub fn get_authentication_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -827,6 +864,7 @@ impl crate::Response for GetAuthenticationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1/".to_owned(); @@ -840,12 +878,14 @@ pub fn get_authentication_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -880,6 +920,7 @@ impl crate::Response for GetAuthenticationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1beta1/".to_owned(); @@ -893,12 +934,14 @@ pub fn get_authentication_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +976,7 @@ impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationAPIGroupResponse`]`>` constructor, or [`GetAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/".to_owned(); @@ -946,12 +990,14 @@ pub fn get_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -986,6 +1032,7 @@ impl crate::Response for GetAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1/".to_owned(); @@ -999,12 +1046,14 @@ pub fn get_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1039,6 +1088,7 @@ impl crate::Response for GetAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1beta1/".to_owned(); @@ -1052,12 +1102,14 @@ pub fn get_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1092,6 +1144,7 @@ impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingAPIGroupResponse`]`>` constructor, or [`GetAutoscalingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/".to_owned(); @@ -1105,12 +1158,14 @@ pub fn get_autoscaling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1145,6 +1200,7 @@ impl crate::Response for GetAutoscalingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v1/".to_owned(); @@ -1158,12 +1214,14 @@ pub fn get_autoscaling_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1198,6 +1256,7 @@ impl crate::Response for GetAutoscalingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta1/".to_owned(); @@ -1211,12 +1270,14 @@ pub fn get_autoscaling_v2beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1251,6 +1312,7 @@ impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta2APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta2/".to_owned(); @@ -1264,12 +1326,14 @@ pub fn get_autoscaling_v2beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta2APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1304,6 +1368,7 @@ impl crate::Response for GetAutoscalingV2beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchAPIGroupResponse`]`>` constructor, or [`GetBatchAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/".to_owned(); @@ -1317,12 +1382,14 @@ pub fn get_batch_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1357,6 +1424,7 @@ impl crate::Response for GetBatchAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1APIResourcesResponse`]`>` constructor, or [`GetBatchV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1/".to_owned(); @@ -1370,12 +1438,14 @@ pub fn get_batch_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1410,6 +1480,7 @@ impl crate::Response for GetBatchV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1beta1APIResourcesResponse`]`>` constructor, or [`GetBatchV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1beta1/".to_owned(); @@ -1423,12 +1494,14 @@ pub fn get_batch_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1463,6 +1536,7 @@ impl crate::Response for GetBatchV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV2alpha1APIResourcesResponse`]`>` constructor, or [`GetBatchV2alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v2alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v2alpha1/".to_owned(); @@ -1476,12 +1550,14 @@ pub fn get_batch_v2alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v2alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV2alpha1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV2alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1516,6 +1592,7 @@ impl crate::Response for GetBatchV2alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesAPIGroupResponse`]`>` constructor, or [`GetCertificatesAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/".to_owned(); @@ -1529,12 +1606,14 @@ pub fn get_certificates_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1569,6 +1648,7 @@ impl crate::Response for GetCertificatesAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesV1beta1APIResourcesResponse`]`>` constructor, or [`GetCertificatesV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/v1beta1/".to_owned(); @@ -1582,12 +1662,14 @@ pub fn get_certificates_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1622,6 +1704,7 @@ impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { /// get the code version /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCodeVersionResponse`]`>` constructor, or [`GetCodeVersionResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_code_version( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/version/".to_owned(); @@ -1635,12 +1718,14 @@ pub fn get_code_version( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_code_version`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCodeVersionResponse { Ok(crate::v1_14::apimachinery::pkg::version::Info), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCodeVersionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1675,6 +1760,7 @@ impl crate::Response for GetCodeVersionResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoordinationAPIGroupResponse`]`>` constructor, or [`GetCoordinationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_coordination_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/coordination.k8s.io/".to_owned(); @@ -1688,12 +1774,14 @@ pub fn get_coordination_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_coordination_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoordinationAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoordinationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1728,6 +1816,7 @@ impl crate::Response for GetCoordinationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoordinationV1APIResourcesResponse`]`>` constructor, or [`GetCoordinationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_coordination_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/coordination.k8s.io/v1/".to_owned(); @@ -1741,12 +1830,14 @@ pub fn get_coordination_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_coordination_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoordinationV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoordinationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1781,6 +1872,7 @@ impl crate::Response for GetCoordinationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoordinationV1beta1APIResourcesResponse`]`>` constructor, or [`GetCoordinationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_coordination_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/coordination.k8s.io/v1beta1/".to_owned(); @@ -1794,12 +1886,14 @@ pub fn get_coordination_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_coordination_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoordinationV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoordinationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1834,6 +1928,7 @@ impl crate::Response for GetCoordinationV1beta1APIResourcesResponse { /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreAPIVersionsResponse`]`>` constructor, or [`GetCoreAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/".to_owned(); @@ -1847,12 +1942,14 @@ pub fn get_core_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreAPIVersionsResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIVersions), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1887,6 +1984,7 @@ impl crate::Response for GetCoreAPIVersionsResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreV1APIResourcesResponse`]`>` constructor, or [`GetCoreV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/v1/".to_owned(); @@ -1900,12 +1998,14 @@ pub fn get_core_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1940,6 +2040,7 @@ impl crate::Response for GetCoreV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsAPIGroupResponse`]`>` constructor, or [`GetEventsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/".to_owned(); @@ -1953,12 +2054,14 @@ pub fn get_events_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1993,6 +2096,7 @@ impl crate::Response for GetEventsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsV1beta1APIResourcesResponse`]`>` constructor, or [`GetEventsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/v1beta1/".to_owned(); @@ -2006,12 +2110,14 @@ pub fn get_events_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2046,6 +2152,7 @@ impl crate::Response for GetEventsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsAPIGroupResponse`]`>` constructor, or [`GetExtensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/".to_owned(); @@ -2059,12 +2166,14 @@ pub fn get_extensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2099,6 +2208,7 @@ impl crate::Response for GetExtensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetExtensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/v1beta1/".to_owned(); @@ -2112,12 +2222,14 @@ pub fn get_extensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2152,6 +2264,7 @@ impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingAPIGroupResponse`]`>` constructor, or [`GetNetworkingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/".to_owned(); @@ -2165,12 +2278,14 @@ pub fn get_networking_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2205,6 +2320,7 @@ impl crate::Response for GetNetworkingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingV1APIResourcesResponse`]`>` constructor, or [`GetNetworkingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/v1/".to_owned(); @@ -2218,12 +2334,14 @@ pub fn get_networking_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2258,6 +2376,7 @@ impl crate::Response for GetNetworkingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingV1beta1APIResourcesResponse`]`>` constructor, or [`GetNetworkingV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/v1beta1/".to_owned(); @@ -2271,12 +2390,14 @@ pub fn get_networking_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2311,6 +2432,7 @@ impl crate::Response for GetNetworkingV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNodeAPIGroupResponse`]`>` constructor, or [`GetNodeAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_node_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/node.k8s.io/".to_owned(); @@ -2324,12 +2446,14 @@ pub fn get_node_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_node_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNodeAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNodeAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2364,6 +2488,7 @@ impl crate::Response for GetNodeAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNodeV1alpha1APIResourcesResponse`]`>` constructor, or [`GetNodeV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_node_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/node.k8s.io/v1alpha1/".to_owned(); @@ -2377,12 +2502,14 @@ pub fn get_node_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_node_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNodeV1alpha1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNodeV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2417,6 +2544,7 @@ impl crate::Response for GetNodeV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNodeV1beta1APIResourcesResponse`]`>` constructor, or [`GetNodeV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_node_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/node.k8s.io/v1beta1/".to_owned(); @@ -2430,12 +2558,14 @@ pub fn get_node_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_node_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNodeV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNodeV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2470,6 +2600,7 @@ impl crate::Response for GetNodeV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyAPIGroupResponse`]`>` constructor, or [`GetPolicyAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/".to_owned(); @@ -2483,12 +2614,14 @@ pub fn get_policy_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2523,6 +2656,7 @@ impl crate::Response for GetPolicyAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyV1beta1APIResourcesResponse`]`>` constructor, or [`GetPolicyV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/v1beta1/".to_owned(); @@ -2536,12 +2670,14 @@ pub fn get_policy_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2576,6 +2712,7 @@ impl crate::Response for GetPolicyV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationAPIGroupResponse`]`>` constructor, or [`GetRbacAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/".to_owned(); @@ -2589,12 +2726,14 @@ pub fn get_rbac_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2629,6 +2768,7 @@ impl crate::Response for GetRbacAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1/".to_owned(); @@ -2642,12 +2782,14 @@ pub fn get_rbac_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2682,6 +2824,7 @@ impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1alpha1/".to_owned(); @@ -2695,12 +2838,14 @@ pub fn get_rbac_authorization_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1alpha1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2735,6 +2880,7 @@ impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1beta1/".to_owned(); @@ -2748,12 +2894,14 @@ pub fn get_rbac_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2788,6 +2936,7 @@ impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingAPIGroupResponse`]`>` constructor, or [`GetSchedulingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/".to_owned(); @@ -2801,12 +2950,14 @@ pub fn get_scheduling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2841,6 +2992,7 @@ impl crate::Response for GetSchedulingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1/".to_owned(); @@ -2854,12 +3006,14 @@ pub fn get_scheduling_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2894,6 +3048,7 @@ impl crate::Response for GetSchedulingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1alpha1/".to_owned(); @@ -2907,12 +3062,14 @@ pub fn get_scheduling_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1alpha1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2947,6 +3104,7 @@ impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1beta1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1beta1/".to_owned(); @@ -2960,12 +3118,14 @@ pub fn get_scheduling_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3000,6 +3160,7 @@ impl crate::Response for GetSchedulingV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsAPIGroupResponse`]`>` constructor, or [`GetSettingsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/".to_owned(); @@ -3013,12 +3174,14 @@ pub fn get_settings_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3053,6 +3216,7 @@ impl crate::Response for GetSettingsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSettingsV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/v1alpha1/".to_owned(); @@ -3066,12 +3230,14 @@ pub fn get_settings_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsV1alpha1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3106,6 +3272,7 @@ impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageAPIGroupResponse`]`>` constructor, or [`GetStorageAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/".to_owned(); @@ -3119,12 +3286,14 @@ pub fn get_storage_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageAPIGroupResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3159,6 +3328,7 @@ impl crate::Response for GetStorageAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1APIResourcesResponse`]`>` constructor, or [`GetStorageV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1/".to_owned(); @@ -3172,12 +3342,14 @@ pub fn get_storage_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3212,6 +3384,7 @@ impl crate::Response for GetStorageV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1alpha1APIResourcesResponse`]`>` constructor, or [`GetStorageV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1alpha1/".to_owned(); @@ -3225,12 +3398,14 @@ pub fn get_storage_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1alpha1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3265,6 +3440,7 @@ impl crate::Response for GetStorageV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1beta1APIResourcesResponse`]`>` constructor, or [`GetStorageV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1beta1/".to_owned(); @@ -3278,12 +3454,14 @@ pub fn get_storage_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1beta1APIResourcesResponse { Ok(crate::v1_14::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3322,6 +3500,7 @@ impl crate::Response for GetStorageV1beta1APIResourcesResponse { /// * `logpath` /// /// path to the log +#[cfg(feature = "api")] pub fn log_file_handler( logpath: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -3338,11 +3517,13 @@ pub fn log_file_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3367,6 +3548,7 @@ impl crate::Response for LogFileHandlerResponse { // Generated from operation logFileListHandler /// Use the returned [`crate::ResponseBody`]`<`[`LogFileListHandlerResponse`]`>` constructor, or [`LogFileListHandlerResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn log_file_list_handler( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/logs/".to_owned(); @@ -3380,11 +3562,13 @@ pub fn log_file_list_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_list_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileListHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileListHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/admissionregistration/v1beta1/mod.rs b/src/v1_15/api/admissionregistration/v1beta1/mod.rs index 5877cc7978..9de2587b06 100644 --- a/src/v1_15/api/admissionregistration/v1beta1/mod.rs +++ b/src/v1_15/api/admissionregistration/v1beta1/mod.rs @@ -1,61 +1,43 @@ mod mutating_webhook; -pub use self::mutating_webhook::{ - MutatingWebhook, -}; +pub use self::mutating_webhook::MutatingWebhook; mod mutating_webhook_configuration; -pub use self::mutating_webhook_configuration::{ - MutatingWebhookConfiguration, - CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse, - DeleteCollectionMutatingWebhookConfigurationResponse, - DeleteMutatingWebhookConfigurationResponse, - ListMutatingWebhookConfigurationResponse, - PatchMutatingWebhookConfigurationResponse, - ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse, - ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse, - WatchMutatingWebhookConfigurationResponse, -}; +pub use self::mutating_webhook_configuration::MutatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteCollectionMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::ListMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::PatchMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::WatchMutatingWebhookConfigurationResponse; mod mutating_webhook_configuration_list; -pub use self::mutating_webhook_configuration_list::{ - MutatingWebhookConfigurationList, -}; +pub use self::mutating_webhook_configuration_list::MutatingWebhookConfigurationList; mod rule_with_operations; -pub use self::rule_with_operations::{ - RuleWithOperations, -}; +pub use self::rule_with_operations::RuleWithOperations; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod validating_webhook; -pub use self::validating_webhook::{ - ValidatingWebhook, -}; +pub use self::validating_webhook::ValidatingWebhook; mod validating_webhook_configuration; -pub use self::validating_webhook_configuration::{ - ValidatingWebhookConfiguration, - CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse, - DeleteCollectionValidatingWebhookConfigurationResponse, - DeleteValidatingWebhookConfigurationResponse, - ListValidatingWebhookConfigurationResponse, - PatchValidatingWebhookConfigurationResponse, - ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse, - ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse, - WatchValidatingWebhookConfigurationResponse, -}; +pub use self::validating_webhook_configuration::ValidatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteCollectionValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::ListValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::PatchValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::WatchValidatingWebhookConfigurationResponse; mod validating_webhook_configuration_list; -pub use self::validating_webhook_configuration_list::{ - ValidatingWebhookConfigurationList, -}; +pub use self::validating_webhook_configuration_list::ValidatingWebhookConfigurationList; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; diff --git a/src/v1_15/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs b/src/v1_15/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs index b340a985c4..05bb7281e4 100644 --- a/src/v1_15/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs +++ b/src/v1_15/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_mutating_webhook_configuration( body: &crate::v1_15::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, optional: CreateMutatingWebhookConfigurationOptional<'_>, @@ -59,6 +60,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateMutatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateMutatingWebhookConfigurationResponse { Ok(crate::v1_15::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -78,6 +81,7 @@ pub enum CreateMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl MutatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_mutating_webhook_configuration( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -159,6 +164,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_collection_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionMutatingWebhookConfigurationResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_mutating_webhook_configuration( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteMutatingWebhookConfigurationResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_mutating_webhook_configuration( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::list_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListMutatingWebhookConfigurationResponse { Ok(crate::v1_15::api::admissionregistration::v1beta1::MutatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_mutating_webhook_configuration( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::patch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchMutatingWebhookConfigurationResponse { Ok(crate::v1_15::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_mutating_webhook_configuration( name: &str, optional: ReadMutatingWebhookConfigurationOptional<'_>, @@ -498,6 +515,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadMutatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadMutatingWebhookConfigurationResponse { Ok(crate::v1_15::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_mutating_webhook_configuration( name: &str, body: &crate::v1_15::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, @@ -598,6 +619,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceMutatingWebhookConfigurationResponse { Ok(crate::v1_15::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -616,6 +639,7 @@ pub enum ReplaceMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_mutating_webhook_configuration( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::watch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchMutatingWebhookConfigurationResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/admissionregistration/v1beta1/validating_webhook_configuration.rs b/src/v1_15/api/admissionregistration/v1beta1/validating_webhook_configuration.rs index 6594dd9b66..2d918869a4 100644 --- a/src/v1_15/api/admissionregistration/v1beta1/validating_webhook_configuration.rs +++ b/src/v1_15/api/admissionregistration/v1beta1/validating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_validating_webhook_configuration( body: &crate::v1_15::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, optional: CreateValidatingWebhookConfigurationOptional<'_>, @@ -59,6 +60,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateValidatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateValidatingWebhookConfigurationResponse { Ok(crate::v1_15::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -78,6 +81,7 @@ pub enum CreateValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl ValidatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_validating_webhook_configuration( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -159,6 +164,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_collection_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionValidatingWebhookConfigurationResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_validating_webhook_configuration( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteValidatingWebhookConfigurationResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_validating_webhook_configuration( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::list_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListValidatingWebhookConfigurationResponse { Ok(crate::v1_15::api::admissionregistration::v1beta1::ValidatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_validating_webhook_configuration( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::patch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchValidatingWebhookConfigurationResponse { Ok(crate::v1_15::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_validating_webhook_configuration( name: &str, optional: ReadValidatingWebhookConfigurationOptional<'_>, @@ -498,6 +515,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadValidatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadValidatingWebhookConfigurationResponse { Ok(crate::v1_15::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_validating_webhook_configuration( name: &str, body: &crate::v1_15::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, @@ -598,6 +619,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceValidatingWebhookConfigurationResponse { Ok(crate::v1_15::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -616,6 +639,7 @@ pub enum ReplaceValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_validating_webhook_configuration( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::watch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchValidatingWebhookConfigurationResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1/controller_revision.rs b/src/v1_15/api/apps/v1/controller_revision.rs index f656228cd8..a8642d1f79 100644 --- a/src/v1_15/api/apps/v1/controller_revision.rs +++ b/src/v1_15/api/apps/v1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_15::api::apps::v1::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -713,6 +737,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -724,6 +749,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1::ControllerRevision), @@ -731,6 +757,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -782,6 +809,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -800,12 +828,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -876,12 +907,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1/daemon_set.rs b/src/v1_15/api/apps/v1/daemon_set.rs index 56904f1924..b0929c2b7e 100644 --- a/src/v1_15/api/apps/v1/daemon_set.rs +++ b/src/v1_15/api/apps/v1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_15::api::apps::v1::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_15::api::apps::v1::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_15::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_15::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_15::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_15::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_15::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_15::api::apps::v1::DaemonSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_15::api::apps::v1::DaemonSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1/deployment.rs b/src/v1_15/api/apps/v1/deployment.rs index afbc22409b..8d4892603b 100644 --- a/src/v1_15/api/apps/v1/deployment.rs +++ b/src/v1_15/api/apps/v1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_15::api::apps::v1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1::Deployment), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::apps::v1::Deployment), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1/mod.rs b/src/v1_15/api/apps/v1/mod.rs index a25b916f02..971a3fb358 100644 --- a/src/v1_15/api/apps/v1/mod.rs +++ b/src/v1_15/api/apps/v1/mod.rs @@ -1,202 +1,146 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_15/api/apps/v1/replica_set.rs b/src/v1_15/api/apps/v1/replica_set.rs index c590d9e9f8..d004d1a947 100644 --- a/src/v1_15/api/apps/v1/replica_set.rs +++ b/src/v1_15/api/apps/v1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_15::api::apps::v1::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_15::api::apps::v1::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_15::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_15::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_15::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_15::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_15::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_15::api::apps::v1::ReplicaSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_15::api::apps::v1::ReplicaSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1/stateful_set.rs b/src/v1_15/api/apps/v1/stateful_set.rs index 5907f2a79c..97b027fb86 100644 --- a/src/v1_15/api/apps/v1/stateful_set.rs +++ b/src/v1_15/api/apps/v1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_15::api::apps::v1::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_15::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_15::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -891,6 +922,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -902,6 +934,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1::StatefulSet), @@ -909,6 +942,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -968,6 +1002,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -1006,6 +1041,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1017,6 +1053,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_15::api::apps::v1::StatefulSet), @@ -1024,6 +1061,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1079,6 +1117,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1100,12 +1139,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1151,6 +1192,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1169,12 +1211,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1beta1/controller_revision.rs b/src/v1_15/api/apps/v1beta1/controller_revision.rs index 1022e6631c..8d97c92227 100644 --- a/src/v1_15/api/apps/v1beta1/controller_revision.rs +++ b/src/v1_15/api/apps/v1beta1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_15::api::apps::v1beta1::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1beta1::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -713,6 +737,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -724,6 +749,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1beta1::ControllerRevision), @@ -731,6 +757,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -782,6 +809,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -800,12 +828,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -876,12 +907,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1beta1/deployment.rs b/src/v1_15/api/apps/v1beta1/deployment.rs index 757acbe39e..4758fb9f94 100644 --- a/src/v1_15/api/apps/v1beta1/deployment.rs +++ b/src/v1_15/api/apps/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_15::api::apps::v1beta1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1beta1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1beta1::Deployment), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::apps::v1beta1::Deployment), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1beta1/deployment_rollback.rs b/src/v1_15/api/apps/v1beta1/deployment_rollback.rs index 6927d26085..7a81a0e78a 100644 --- a/src/v1_15/api/apps/v1beta1/deployment_rollback.rs +++ b/src/v1_15/api/apps/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -75,6 +76,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -86,6 +88,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -94,6 +97,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1beta1/mod.rs b/src/v1_15/api/apps/v1beta1/mod.rs index 93facd2f47..94ca19493a 100644 --- a/src/v1_15/api/apps/v1beta1/mod.rs +++ b/src/v1_15/api/apps/v1beta1/mod.rs @@ -1,148 +1,106 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_15/api/apps/v1beta1/scale.rs b/src/v1_15/api/apps/v1beta1/scale.rs index 47174a70d9..a8d9fa242a 100644 --- a/src/v1_15/api/apps/v1beta1/scale.rs +++ b/src/v1_15/api/apps/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_15::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -207,6 +213,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -235,6 +242,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -242,12 +250,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -325,6 +336,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -332,12 +344,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_15::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +403,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -427,6 +442,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -438,6 +454,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::apps::v1beta1::Scale), @@ -445,6 +462,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -504,6 +522,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -542,6 +561,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -553,6 +573,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_15::api::apps::v1beta1::Scale), @@ -560,6 +581,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1beta1/stateful_set.rs b/src/v1_15/api/apps/v1beta1/stateful_set.rs index 8fab11461a..f7a37cbd87 100644 --- a/src/v1_15/api/apps/v1beta1/stateful_set.rs +++ b/src/v1_15/api/apps/v1beta1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_15::api::apps::v1beta1::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1beta1::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -891,6 +922,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -902,6 +934,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1beta1::StatefulSet), @@ -909,6 +942,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -968,6 +1002,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -1006,6 +1041,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1017,6 +1053,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta1::StatefulSet), @@ -1024,6 +1061,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1079,6 +1117,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1100,12 +1139,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1151,6 +1192,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1169,12 +1211,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1beta2/controller_revision.rs b/src/v1_15/api/apps/v1beta2/controller_revision.rs index d9db99083d..139a77cebf 100644 --- a/src/v1_15/api/apps/v1beta2/controller_revision.rs +++ b/src/v1_15/api/apps/v1beta2/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_15::api::apps::v1beta2::ControllerRevision, @@ -69,6 +70,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1beta2::ControllerRevision), @@ -88,6 +91,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -618,12 +639,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -713,6 +737,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -724,6 +749,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_15::api::apps::v1beta2::ControllerRevision), @@ -731,6 +757,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -782,6 +809,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -800,12 +828,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -876,12 +907,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1beta2/daemon_set.rs b/src/v1_15/api/apps/v1beta2/daemon_set.rs index dc78021bef..c674e40c57 100644 --- a/src/v1_15/api/apps/v1beta2/daemon_set.rs +++ b/src/v1_15/api/apps/v1beta2/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_15::api::apps::v1beta2::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_15::api::apps::v1beta2::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_15::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_15::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_15::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_15::api::apps::v1beta2::DaemonSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::DaemonSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1beta2/deployment.rs b/src/v1_15/api/apps/v1beta2/deployment.rs index 9c8cacb1d5..37b58111b6 100644 --- a/src/v1_15/api/apps/v1beta2/deployment.rs +++ b/src/v1_15/api/apps/v1beta2/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_15::api::apps::v1beta2::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1beta2::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_15::api::apps::v1beta2::Deployment), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::Deployment), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1beta2/mod.rs b/src/v1_15/api/apps/v1beta2/mod.rs index a95884f4d6..60c611aefd 100644 --- a/src/v1_15/api/apps/v1beta2/mod.rs +++ b/src/v1_15/api/apps/v1beta2/mod.rs @@ -1,226 +1,164 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_15/api/apps/v1beta2/replica_set.rs b/src/v1_15/api/apps/v1beta2/replica_set.rs index 414d09377e..c377882b98 100644 --- a/src/v1_15/api/apps/v1beta2/replica_set.rs +++ b/src/v1_15/api/apps/v1beta2/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_15::api::apps::v1beta2::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_15::api::apps::v1beta2::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_15::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_15::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_15::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_15::api::apps::v1beta2::ReplicaSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::ReplicaSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1beta2/scale.rs b/src/v1_15/api/apps/v1beta2/scale.rs index cccec4b1a9..af1a3ae65b 100644 --- a/src/v1_15/api/apps/v1beta2/scale.rs +++ b/src/v1_15/api/apps/v1beta2/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_15::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_15::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_15::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_15::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -603,6 +625,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -614,6 +637,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::apps::v1beta2::Scale), @@ -621,6 +645,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -680,6 +705,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -718,6 +744,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -729,6 +756,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_15::api::apps::v1beta2::Scale), @@ -736,6 +764,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -795,6 +824,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -833,6 +863,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -844,6 +875,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_15::api::apps::v1beta2::Scale), @@ -851,6 +883,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/apps/v1beta2/stateful_set.rs b/src/v1_15/api/apps/v1beta2/stateful_set.rs index 38ea8dad15..a627fa40f2 100644 --- a/src/v1_15/api/apps/v1beta2/stateful_set.rs +++ b/src/v1_15/api/apps/v1beta2/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_15::api::apps::v1beta2::StatefulSet, @@ -71,6 +72,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -82,6 +84,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1beta2::StatefulSet), @@ -90,6 +93,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -155,6 +159,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -178,6 +183,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -185,6 +191,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -247,6 +254,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -268,6 +276,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -276,6 +285,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -344,6 +354,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -365,12 +376,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -414,6 +427,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -432,12 +446,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_15::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -489,6 +505,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -518,12 +535,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -575,6 +594,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -604,12 +624,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +681,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -695,6 +718,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -706,12 +730,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -761,6 +787,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -789,6 +816,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -796,12 +824,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -891,6 +922,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -902,6 +934,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_15::api::apps::v1beta2::StatefulSet), @@ -909,6 +942,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -968,6 +1002,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -1006,6 +1041,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1017,6 +1053,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_15::api::apps::v1beta2::StatefulSet), @@ -1024,6 +1061,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1079,6 +1117,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1100,12 +1139,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1151,6 +1192,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1169,12 +1211,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/auditregistration/v1alpha1/audit_sink.rs b/src/v1_15/api/auditregistration/v1alpha1/audit_sink.rs index 2ef1f51df2..89d190181e 100644 --- a/src/v1_15/api/auditregistration/v1alpha1/audit_sink.rs +++ b/src/v1_15/api/auditregistration/v1alpha1/audit_sink.rs @@ -25,6 +25,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_audit_sink( body: &crate::v1_15::api::auditregistration::v1alpha1::AuditSink, optional: CreateAuditSinkOptional<'_>, @@ -58,6 +59,7 @@ impl AuditSink { } /// Optional parameters of [`AuditSink::create_audit_sink`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAuditSinkOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -69,6 +71,7 @@ pub struct CreateAuditSinkOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::create_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAuditSinkResponse { Ok(crate::v1_15::api::auditregistration::v1alpha1::AuditSink), @@ -77,6 +80,7 @@ pub enum CreateAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_audit_sink( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -157,6 +162,7 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::delete_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAuditSinkResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -165,6 +171,7 @@ pub enum DeleteAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -231,6 +238,7 @@ impl AuditSink { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_audit_sink( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -251,6 +259,7 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::delete_collection_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAuditSinkResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteCollectionAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -314,6 +324,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_audit_sink( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -332,12 +343,14 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::list_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAuditSinkResponse { Ok(crate::v1_15::api::auditregistration::v1alpha1::AuditSinkList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -385,6 +398,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_audit_sink( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -412,12 +426,14 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::patch_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAuditSinkResponse { Ok(crate::v1_15::api::auditregistration::v1alpha1::AuditSink), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_audit_sink( name: &str, optional: ReadAuditSinkOptional<'_>, @@ -497,6 +514,7 @@ impl AuditSink { } /// Optional parameters of [`AuditSink::read_audit_sink`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAuditSinkOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -508,12 +526,14 @@ pub struct ReadAuditSinkOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::read_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAuditSinkResponse { Ok(crate::v1_15::api::auditregistration::v1alpha1::AuditSink), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -561,6 +581,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_audit_sink( name: &str, body: &crate::v1_15::api::auditregistration::v1alpha1::AuditSink, @@ -597,6 +618,7 @@ impl AuditSink { } /// Optional parameters of [`AuditSink::replace_audit_sink`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAuditSinkOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -608,6 +630,7 @@ pub struct ReplaceAuditSinkOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::replace_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAuditSinkResponse { Ok(crate::v1_15::api::auditregistration::v1alpha1::AuditSink), @@ -615,6 +638,7 @@ pub enum ReplaceAuditSinkResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -666,6 +690,7 @@ impl AuditSink { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_audit_sink( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -684,12 +709,14 @@ impl AuditSink { } /// Use `::try_from_parts` to parse the HTTP response body of [`AuditSink::watch_audit_sink`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAuditSinkResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAuditSinkResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/auditregistration/v1alpha1/mod.rs b/src/v1_15/api/auditregistration/v1alpha1/mod.rs index 3db2282342..184bc96846 100644 --- a/src/v1_15/api/auditregistration/v1alpha1/mod.rs +++ b/src/v1_15/api/auditregistration/v1alpha1/mod.rs @@ -1,48 +1,32 @@ mod audit_sink; -pub use self::audit_sink::{ - AuditSink, - CreateAuditSinkOptional, CreateAuditSinkResponse, - DeleteAuditSinkResponse, - DeleteCollectionAuditSinkResponse, - ListAuditSinkResponse, - PatchAuditSinkResponse, - ReadAuditSinkOptional, ReadAuditSinkResponse, - ReplaceAuditSinkOptional, ReplaceAuditSinkResponse, - WatchAuditSinkResponse, -}; +pub use self::audit_sink::AuditSink; +#[cfg(feature = "api")] pub use self::audit_sink::{CreateAuditSinkOptional, CreateAuditSinkResponse}; +#[cfg(feature = "api")] pub use self::audit_sink::DeleteAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::DeleteCollectionAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::ListAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::PatchAuditSinkResponse; +#[cfg(feature = "api")] pub use self::audit_sink::{ReadAuditSinkOptional, ReadAuditSinkResponse}; +#[cfg(feature = "api")] pub use self::audit_sink::{ReplaceAuditSinkOptional, ReplaceAuditSinkResponse}; +#[cfg(feature = "api")] pub use self::audit_sink::WatchAuditSinkResponse; mod audit_sink_list; -pub use self::audit_sink_list::{ - AuditSinkList, -}; +pub use self::audit_sink_list::AuditSinkList; mod audit_sink_spec; -pub use self::audit_sink_spec::{ - AuditSinkSpec, -}; +pub use self::audit_sink_spec::AuditSinkSpec; mod policy; -pub use self::policy::{ - Policy, -}; +pub use self::policy::Policy; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod webhook; -pub use self::webhook::{ - Webhook, -}; +pub use self::webhook::Webhook; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; mod webhook_throttle_config; -pub use self::webhook_throttle_config::{ - WebhookThrottleConfig, -}; +pub use self::webhook_throttle_config::WebhookThrottleConfig; diff --git a/src/v1_15/api/authentication/v1/mod.rs b/src/v1_15/api/authentication/v1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_15/api/authentication/v1/mod.rs +++ b/src/v1_15/api/authentication/v1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_15/api/authentication/v1/token_review.rs b/src/v1_15/api/authentication/v1/token_review.rs index e2e6c3397c..8a3942cea6 100644 --- a/src/v1_15/api/authentication/v1/token_review.rs +++ b/src/v1_15/api/authentication/v1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_15::api::authentication::v1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -61,6 +62,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_15::api::authentication::v1::TokenReview), @@ -80,6 +83,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/authentication/v1beta1/mod.rs b/src/v1_15/api/authentication/v1beta1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_15/api/authentication/v1beta1/mod.rs +++ b/src/v1_15/api/authentication/v1beta1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_15/api/authentication/v1beta1/token_review.rs b/src/v1_15/api/authentication/v1beta1/token_review.rs index d324961a2b..df1cf3b793 100644 --- a/src/v1_15/api/authentication/v1beta1/token_review.rs +++ b/src/v1_15/api/authentication/v1beta1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_15::api::authentication::v1beta1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -61,6 +62,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_15::api::authentication::v1beta1::TokenReview), @@ -80,6 +83,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/authorization/v1/local_subject_access_review.rs b/src/v1_15/api/authorization/v1/local_subject_access_review.rs index dca1133a5b..7d38350d95 100644 --- a/src/v1_15/api/authorization/v1/local_subject_access_review.rs +++ b/src/v1_15/api/authorization/v1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_15::api::authorization::v1::LocalSubjectAccessReview, @@ -68,6 +69,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_15::api::authorization::v1::LocalSubjectAccessReview), @@ -87,6 +90,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/authorization/v1/mod.rs b/src/v1_15/api/authorization/v1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_15/api/authorization/v1/mod.rs +++ b/src/v1_15/api/authorization/v1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_15/api/authorization/v1/self_subject_access_review.rs b/src/v1_15/api/authorization/v1/self_subject_access_review.rs index b082214505..31c93edd49 100644 --- a/src/v1_15/api/authorization/v1/self_subject_access_review.rs +++ b/src/v1_15/api/authorization/v1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_15::api::authorization::v1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_15::api::authorization::v1::SelfSubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/authorization/v1/self_subject_rules_review.rs b/src/v1_15/api/authorization/v1/self_subject_rules_review.rs index 46c98a25fe..bf6c901732 100644 --- a/src/v1_15/api/authorization/v1/self_subject_rules_review.rs +++ b/src/v1_15/api/authorization/v1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_15::api::authorization::v1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_15::api::authorization::v1::SelfSubjectRulesReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/authorization/v1/subject_access_review.rs b/src/v1_15/api/authorization/v1/subject_access_review.rs index 47b1b5b0c3..3b32c1ec9d 100644 --- a/src/v1_15/api/authorization/v1/subject_access_review.rs +++ b/src/v1_15/api/authorization/v1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_15::api::authorization::v1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_15::api::authorization::v1::SubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/authorization/v1beta1/local_subject_access_review.rs b/src/v1_15/api/authorization/v1beta1/local_subject_access_review.rs index b375998e88..9dac3025bc 100644 --- a/src/v1_15/api/authorization/v1beta1/local_subject_access_review.rs +++ b/src/v1_15/api/authorization/v1beta1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_15::api::authorization::v1beta1::LocalSubjectAccessReview, @@ -68,6 +69,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_15::api::authorization::v1beta1::LocalSubjectAccessReview), @@ -87,6 +90,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/authorization/v1beta1/mod.rs b/src/v1_15/api/authorization/v1beta1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_15/api/authorization/v1beta1/mod.rs +++ b/src/v1_15/api/authorization/v1beta1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_15/api/authorization/v1beta1/self_subject_access_review.rs b/src/v1_15/api/authorization/v1beta1/self_subject_access_review.rs index 09395b057a..a3fffc821e 100644 --- a/src/v1_15/api/authorization/v1beta1/self_subject_access_review.rs +++ b/src/v1_15/api/authorization/v1beta1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_15::api::authorization::v1beta1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_15::api::authorization::v1beta1::SelfSubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/authorization/v1beta1/self_subject_rules_review.rs b/src/v1_15/api/authorization/v1beta1/self_subject_rules_review.rs index e6c7f43f2d..a1a6d55665 100644 --- a/src/v1_15/api/authorization/v1beta1/self_subject_rules_review.rs +++ b/src/v1_15/api/authorization/v1beta1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_15::api::authorization::v1beta1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_15::api::authorization::v1beta1::SelfSubjectRulesReview), @@ -80,6 +83,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/authorization/v1beta1/subject_access_review.rs b/src/v1_15/api/authorization/v1beta1/subject_access_review.rs index 621bd970c0..4b7fbca26d 100644 --- a/src/v1_15/api/authorization/v1beta1/subject_access_review.rs +++ b/src/v1_15/api/authorization/v1beta1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_15::api::authorization::v1beta1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -61,6 +62,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_15::api::authorization::v1beta1::SubjectAccessReview), @@ -80,6 +83,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/autoscaling/v1/horizontal_pod_autoscaler.rs b/src/v1_15/api/autoscaling/v1/horizontal_pod_autoscaler.rs index bdae1f3046..b5681562f3 100644 --- a/src/v1_15/api/autoscaling/v1/horizontal_pod_autoscaler.rs +++ b/src/v1_15/api/autoscaling/v1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_15::api::autoscaling::v1::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_15::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_15::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_15::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_15::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/autoscaling/v1/mod.rs b/src/v1_15/api/autoscaling/v1/mod.rs index a4f7a0312d..09ed1f1487 100644 --- a/src/v1_15/api/autoscaling/v1/mod.rs +++ b/src/v1_15/api/autoscaling/v1/mod.rs @@ -1,65 +1,49 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - PatchNamespacedReplicationControllerScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, - ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; diff --git a/src/v1_15/api/autoscaling/v1/scale.rs b/src/v1_15/api/autoscaling/v1/scale.rs index 06607017f9..577b117450 100644 --- a/src/v1_15/api/autoscaling/v1/scale.rs +++ b/src/v1_15/api/autoscaling/v1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -295,6 +304,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -324,12 +334,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -379,6 +391,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -407,6 +420,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -414,12 +428,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -497,6 +514,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -504,12 +522,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -559,6 +579,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -587,6 +608,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -594,12 +616,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -649,6 +673,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -677,6 +702,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -684,12 +710,14 @@ pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +769,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -779,6 +808,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -790,6 +820,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), @@ -797,6 +828,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -856,6 +888,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -894,6 +927,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -905,6 +939,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), @@ -912,6 +947,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -971,6 +1007,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -1009,6 +1046,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1020,6 +1058,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), @@ -1027,6 +1066,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1086,6 +1126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -1124,6 +1165,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1135,6 +1177,7 @@ pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerScaleResponse { Ok(crate::v1_15::api::autoscaling::v1::Scale), @@ -1142,6 +1185,7 @@ pub enum ReplaceNamespacedReplicationControllerScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs b/src/v1_15/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs index 863351499b..53846096b0 100644 --- a/src/v1_15/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs +++ b/src/v1_15/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_15::api::autoscaling::v2beta1::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_15::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_15::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_15::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_15::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/autoscaling/v2beta1/mod.rs b/src/v1_15/api/autoscaling/v2beta1/mod.rs index edb3c1e242..83788a8cb3 100644 --- a/src/v1_15/api/autoscaling/v2beta1/mod.rs +++ b/src/v1_15/api/autoscaling/v2beta1/mod.rs @@ -1,93 +1,61 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod external_metric_source; -pub use self::external_metric_source::{ - ExternalMetricSource, -}; +pub use self::external_metric_source::ExternalMetricSource; mod external_metric_status; -pub use self::external_metric_status::{ - ExternalMetricStatus, -}; +pub use self::external_metric_status::ExternalMetricStatus; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_15/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs b/src/v1_15/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs index b8b45a918b..8da2516285 100644 --- a/src/v1_15/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs +++ b/src/v1_15/api/autoscaling/v2beta2/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_15::api::autoscaling::v2beta2::HorizontalPodAutoscaler, @@ -69,6 +70,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -88,6 +91,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_15::api::autoscaling::v2beta2::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v2beta2::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_15::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_15::api::autoscaling::v2beta2::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_15::api::autoscaling::v2beta2::HorizontalPodAutoscaler), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/autoscaling/v2beta2/mod.rs b/src/v1_15/api/autoscaling/v2beta2/mod.rs index 5823acde4f..2de8195cc9 100644 --- a/src/v1_15/api/autoscaling/v2beta2/mod.rs +++ b/src/v1_15/api/autoscaling/v2beta2/mod.rs @@ -1,108 +1,70 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod external_metric_source; -pub use self::external_metric_source::{ - ExternalMetricSource, -}; +pub use self::external_metric_source::ExternalMetricSource; mod external_metric_status; -pub use self::external_metric_status::{ - ExternalMetricStatus, -}; +pub use self::external_metric_status::ExternalMetricStatus; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_identifier; -pub use self::metric_identifier::{ - MetricIdentifier, -}; +pub use self::metric_identifier::MetricIdentifier; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod metric_target; -pub use self::metric_target::{ - MetricTarget, -}; +pub use self::metric_target::MetricTarget; mod metric_value_status; -pub use self::metric_value_status::{ - MetricValueStatus, -}; +pub use self::metric_value_status::MetricValueStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_15/api/batch/v1/job.rs b/src/v1_15/api/batch/v1/job.rs index 85ca84cd58..8dff01ac35 100644 --- a/src/v1_15/api/batch/v1/job.rs +++ b/src/v1_15/api/batch/v1/job.rs @@ -33,6 +33,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_job( namespace: &str, body: &crate::v1_15::api::batch::v1::Job, @@ -69,6 +70,7 @@ impl Job { } /// Optional parameters of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedJobResponse { Ok(crate::v1_15::api::batch::v1::Job), @@ -88,6 +91,7 @@ pub enum CreateNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Job { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_job( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_collection_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedJobResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedJobResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_job_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListJobForAllNamespacesResponse { Ok(crate::v1_15::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_job( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedJobResponse { Ok(crate::v1_15::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobResponse { Ok(crate::v1_15::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobStatusResponse { Ok(crate::v1_15::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobResponse { Ok(crate::v1_15::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobStatusResponse { Ok(crate::v1_15::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobResponse { Ok(crate::v1_15::api::batch::v1::Job), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobStatusResponse { Ok(crate::v1_15::api::batch::v1::Job), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_job_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchJobForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_job( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedJobResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/batch/v1/mod.rs b/src/v1_15/api/batch/v1/mod.rs index 68e7a18867..97d7bccb74 100644 --- a/src/v1_15/api/batch/v1/mod.rs +++ b/src/v1_15/api/batch/v1/mod.rs @@ -1,38 +1,28 @@ mod job; -pub use self::job::{ - Job, - CreateNamespacedJobOptional, CreateNamespacedJobResponse, - DeleteCollectionNamespacedJobResponse, - DeleteNamespacedJobResponse, - ListJobForAllNamespacesResponse, - ListNamespacedJobResponse, - PatchNamespacedJobResponse, - PatchNamespacedJobStatusResponse, - ReadNamespacedJobOptional, ReadNamespacedJobResponse, - ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse, - ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse, - ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse, - WatchJobForAllNamespacesResponse, - WatchNamespacedJobResponse, -}; +pub use self::job::Job; +#[cfg(feature = "api")] pub use self::job::{CreateNamespacedJobOptional, CreateNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::DeleteCollectionNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::DeleteNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::ListJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::ListNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobStatusResponse; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobOptional, ReadNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::WatchJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::WatchNamespacedJobResponse; mod job_condition; -pub use self::job_condition::{ - JobCondition, -}; +pub use self::job_condition::JobCondition; mod job_list; -pub use self::job_list::{ - JobList, -}; +pub use self::job_list::JobList; mod job_spec; -pub use self::job_spec::{ - JobSpec, -}; +pub use self::job_spec::JobSpec; mod job_status; -pub use self::job_status::{ - JobStatus, -}; +pub use self::job_status::JobStatus; diff --git a/src/v1_15/api/batch/v1beta1/cron_job.rs b/src/v1_15/api/batch/v1beta1/cron_job.rs index b3b9e0a491..561d24d7b6 100644 --- a/src/v1_15/api/batch/v1beta1/cron_job.rs +++ b/src/v1_15/api/batch/v1beta1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_15::api::batch::v1beta1::CronJob, @@ -69,6 +70,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_15::api::batch::v1beta1::CronJob), @@ -88,6 +91,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_15::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_15::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_15::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_15::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_15::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_15::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_15::api::batch::v1beta1::CronJob), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_15::api::batch::v1beta1::CronJob), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/batch/v1beta1/mod.rs b/src/v1_15/api/batch/v1beta1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_15/api/batch/v1beta1/mod.rs +++ b/src/v1_15/api/batch/v1beta1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_15/api/batch/v2alpha1/cron_job.rs b/src/v1_15/api/batch/v2alpha1/cron_job.rs index 837264d5f7..c402546427 100644 --- a/src/v1_15/api/batch/v2alpha1/cron_job.rs +++ b/src/v1_15/api/batch/v2alpha1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_15::api::batch::v2alpha1::CronJob, @@ -69,6 +70,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_15::api::batch::v2alpha1::CronJob), @@ -88,6 +91,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_15::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_15::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_15::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_15::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_15::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_15::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_15::api::batch::v2alpha1::CronJob), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_15::api::batch::v2alpha1::CronJob), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/batch/v2alpha1/mod.rs b/src/v1_15/api/batch/v2alpha1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_15/api/batch/v2alpha1/mod.rs +++ b/src/v1_15/api/batch/v2alpha1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_15/api/certificates/v1beta1/certificate_signing_request.rs b/src/v1_15/api/certificates/v1beta1/certificate_signing_request.rs index a729f647d4..6f7c76b514 100644 --- a/src/v1_15/api/certificates/v1beta1/certificate_signing_request.rs +++ b/src/v1_15/api/certificates/v1beta1/certificate_signing_request.rs @@ -28,6 +28,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_certificate_signing_request( body: &crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest, optional: CreateCertificateSigningRequestOptional<'_>, @@ -61,6 +62,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCertificateSigningRequestOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCertificateSigningRequestResponse { Ok(crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest), @@ -80,6 +83,7 @@ pub enum CreateCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_certificate_signing_request( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCertificateSigningRequestResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl CertificateSigningRequest { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_certificate_signing_request( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -254,6 +262,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_collection_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCertificateSigningRequestResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_certificate_signing_request( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::list_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCertificateSigningRequestResponse { Ok(crate::v1_15::api::certificates::v1beta1::CertificateSigningRequestList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestResponse { Ok(crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request_status( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestStatusResponse { Ok(crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request( name: &str, optional: ReadCertificateSigningRequestOptional<'_>, @@ -580,6 +600,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -591,12 +612,14 @@ pub struct ReadCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestResponse { Ok(crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request_status( name: &str, optional: ReadCertificateSigningRequestStatusOptional<'_>, @@ -668,6 +692,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestStatusResponse { Ok(crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request( name: &str, body: &crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest, @@ -764,6 +792,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -775,6 +804,7 @@ pub struct ReplaceCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestResponse { Ok(crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest), @@ -782,6 +812,7 @@ pub enum ReplaceCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +868,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_approval( name: &str, body: &crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest, @@ -873,6 +905,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -884,6 +917,7 @@ pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestApprovalResponse { Ok(crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest), @@ -891,6 +925,7 @@ pub enum ReplaceCertificateSigningRequestApprovalResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestApprovalResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -946,6 +981,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_status( name: &str, body: &crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest, @@ -982,6 +1018,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -993,6 +1030,7 @@ pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestStatusResponse { Ok(crate::v1_15::api::certificates::v1beta1::CertificateSigningRequest), @@ -1000,6 +1038,7 @@ pub enum ReplaceCertificateSigningRequestStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1051,6 +1090,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_certificate_signing_request( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1069,12 +1109,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::watch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCertificateSigningRequestResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/certificates/v1beta1/mod.rs b/src/v1_15/api/certificates/v1beta1/mod.rs index 48cb9add17..bb9e9e4c0a 100644 --- a/src/v1_15/api/certificates/v1beta1/mod.rs +++ b/src/v1_15/api/certificates/v1beta1/mod.rs @@ -1,37 +1,27 @@ mod certificate_signing_request; -pub use self::certificate_signing_request::{ - CertificateSigningRequest, - CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse, - DeleteCertificateSigningRequestResponse, - DeleteCollectionCertificateSigningRequestResponse, - ListCertificateSigningRequestResponse, - PatchCertificateSigningRequestResponse, - PatchCertificateSigningRequestStatusResponse, - ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse, - ReadCertificateSigningRequestStatusOptional, ReadCertificateSigningRequestStatusResponse, - ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse, - ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse, - ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse, - WatchCertificateSigningRequestResponse, -}; +pub use self::certificate_signing_request::CertificateSigningRequest; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCollectionCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::ListCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestStatusResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestStatusOptional, ReadCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::WatchCertificateSigningRequestResponse; mod certificate_signing_request_condition; -pub use self::certificate_signing_request_condition::{ - CertificateSigningRequestCondition, -}; +pub use self::certificate_signing_request_condition::CertificateSigningRequestCondition; mod certificate_signing_request_list; -pub use self::certificate_signing_request_list::{ - CertificateSigningRequestList, -}; +pub use self::certificate_signing_request_list::CertificateSigningRequestList; mod certificate_signing_request_spec; -pub use self::certificate_signing_request_spec::{ - CertificateSigningRequestSpec, -}; +pub use self::certificate_signing_request_spec::CertificateSigningRequestSpec; mod certificate_signing_request_status; -pub use self::certificate_signing_request_status::{ - CertificateSigningRequestStatus, -}; +pub use self::certificate_signing_request_status::CertificateSigningRequestStatus; diff --git a/src/v1_15/api/coordination/v1/lease.rs b/src/v1_15/api/coordination/v1/lease.rs index eab9ab6888..2de5b85d75 100644 --- a/src/v1_15/api/coordination/v1/lease.rs +++ b/src/v1_15/api/coordination/v1/lease.rs @@ -30,6 +30,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_lease( namespace: &str, body: &crate::v1_15::api::coordination::v1::Lease, @@ -66,6 +67,7 @@ impl Lease { } /// Optional parameters of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLeaseResponse { Ok(crate::v1_15::api::coordination::v1::Lease), @@ -85,6 +88,7 @@ pub enum CreateNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Lease { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_lease( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_collection_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLeaseResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_lease( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLeaseResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_lease_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLeaseForAllNamespacesResponse { Ok(crate::v1_15::api::coordination::v1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_lease( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -427,12 +441,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLeaseResponse { Ok(crate::v1_15::api::coordination::v1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_lease( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::patch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLeaseResponse { Ok(crate::v1_15::api::coordination::v1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_lease( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl Lease { } /// Optional parameters of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLeaseOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLeaseResponse { Ok(crate::v1_15::api::coordination::v1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_lease( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl Lease { } /// Optional parameters of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLeaseResponse { Ok(crate::v1_15::api::coordination::v1::Lease), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -779,6 +806,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_lease_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -797,12 +825,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLeaseForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -852,6 +882,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_lease( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -873,12 +904,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLeaseResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/coordination/v1/mod.rs b/src/v1_15/api/coordination/v1/mod.rs index 5c3207ad2d..ff1ce80627 100644 --- a/src/v1_15/api/coordination/v1/mod.rs +++ b/src/v1_15/api/coordination/v1/mod.rs @@ -1,25 +1,19 @@ mod lease; -pub use self::lease::{ - Lease, - CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse, - DeleteCollectionNamespacedLeaseResponse, - DeleteNamespacedLeaseResponse, - ListLeaseForAllNamespacesResponse, - ListNamespacedLeaseResponse, - PatchNamespacedLeaseResponse, - ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse, - ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse, - WatchLeaseForAllNamespacesResponse, - WatchNamespacedLeaseResponse, -}; +pub use self::lease::Lease; +#[cfg(feature = "api")] pub use self::lease::{CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::DeleteCollectionNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::DeleteNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::ListLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::ListNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::PatchNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::{ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::{ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::WatchLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::WatchNamespacedLeaseResponse; mod lease_list; -pub use self::lease_list::{ - LeaseList, -}; +pub use self::lease_list::LeaseList; mod lease_spec; -pub use self::lease_spec::{ - LeaseSpec, -}; +pub use self::lease_spec::LeaseSpec; diff --git a/src/v1_15/api/coordination/v1beta1/lease.rs b/src/v1_15/api/coordination/v1beta1/lease.rs index c4e48c6cc9..ffcf95f5ad 100644 --- a/src/v1_15/api/coordination/v1beta1/lease.rs +++ b/src/v1_15/api/coordination/v1beta1/lease.rs @@ -30,6 +30,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_lease( namespace: &str, body: &crate::v1_15::api::coordination::v1beta1::Lease, @@ -66,6 +67,7 @@ impl Lease { } /// Optional parameters of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::create_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLeaseResponse { Ok(crate::v1_15::api::coordination::v1beta1::Lease), @@ -85,6 +88,7 @@ pub enum CreateNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Lease { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_lease( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_collection_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLeaseResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_lease( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::delete_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLeaseResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_lease_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLeaseForAllNamespacesResponse { Ok(crate::v1_15::api::coordination::v1beta1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_lease( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -427,12 +441,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::list_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLeaseResponse { Ok(crate::v1_15::api::coordination::v1beta1::LeaseList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_lease( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::patch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLeaseResponse { Ok(crate::v1_15::api::coordination::v1beta1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_lease( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl Lease { } /// Optional parameters of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLeaseOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::read_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLeaseResponse { Ok(crate::v1_15::api::coordination::v1beta1::Lease), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_lease( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl Lease { } /// Optional parameters of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLeaseOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedLeaseOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::replace_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLeaseResponse { Ok(crate::v1_15::api::coordination::v1beta1::Lease), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedLeaseResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -779,6 +806,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_lease_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -797,12 +825,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_lease_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLeaseForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLeaseForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -852,6 +882,7 @@ impl Lease { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_lease( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -873,12 +904,14 @@ impl Lease { } /// Use `::try_from_parts` to parse the HTTP response body of [`Lease::watch_namespaced_lease`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLeaseResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLeaseResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/coordination/v1beta1/mod.rs b/src/v1_15/api/coordination/v1beta1/mod.rs index 5c3207ad2d..ff1ce80627 100644 --- a/src/v1_15/api/coordination/v1beta1/mod.rs +++ b/src/v1_15/api/coordination/v1beta1/mod.rs @@ -1,25 +1,19 @@ mod lease; -pub use self::lease::{ - Lease, - CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse, - DeleteCollectionNamespacedLeaseResponse, - DeleteNamespacedLeaseResponse, - ListLeaseForAllNamespacesResponse, - ListNamespacedLeaseResponse, - PatchNamespacedLeaseResponse, - ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse, - ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse, - WatchLeaseForAllNamespacesResponse, - WatchNamespacedLeaseResponse, -}; +pub use self::lease::Lease; +#[cfg(feature = "api")] pub use self::lease::{CreateNamespacedLeaseOptional, CreateNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::DeleteCollectionNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::DeleteNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::ListLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::ListNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::PatchNamespacedLeaseResponse; +#[cfg(feature = "api")] pub use self::lease::{ReadNamespacedLeaseOptional, ReadNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::{ReplaceNamespacedLeaseOptional, ReplaceNamespacedLeaseResponse}; +#[cfg(feature = "api")] pub use self::lease::WatchLeaseForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::lease::WatchNamespacedLeaseResponse; mod lease_list; -pub use self::lease_list::{ - LeaseList, -}; +pub use self::lease_list::LeaseList; mod lease_spec; -pub use self::lease_spec::{ - LeaseSpec, -}; +pub use self::lease_spec::LeaseSpec; diff --git a/src/v1_15/api/core/v1/binding.rs b/src/v1_15/api/core/v1/binding.rs index 745ccfa9cb..07b76a96b1 100644 --- a/src/v1_15/api/core/v1/binding.rs +++ b/src/v1_15/api/core/v1/binding.rs @@ -30,6 +30,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_binding( namespace: &str, body: &crate::v1_15::api::core::v1::Binding, @@ -66,6 +67,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedBindingResponse { Ok(crate::v1_15::api::core::v1::Binding), @@ -85,6 +88,7 @@ pub enum CreateNamespacedBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -152,6 +156,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_binding( name: &str, namespace: &str, @@ -190,6 +195,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -201,6 +207,7 @@ pub struct CreateNamespacedPodBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodBindingResponse { Ok(crate::v1_15::api::core::v1::Binding), @@ -209,6 +216,7 @@ pub enum CreateNamespacedPodBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/component_status.rs b/src/v1_15/api/core/v1/component_status.rs index b7567cbd42..caa430e2bc 100644 --- a/src/v1_15/api/core/v1/component_status.rs +++ b/src/v1_15/api/core/v1/component_status.rs @@ -26,6 +26,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_component_status( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -44,12 +45,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::list_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListComponentStatusResponse { Ok(crate::v1_15::api::core::v1::ComponentStatusList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -95,6 +98,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_component_status( name: &str, optional: ReadComponentStatusOptional<'_>, @@ -121,6 +125,7 @@ impl ComponentStatus { } /// Optional parameters of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadComponentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -128,12 +133,14 @@ pub struct ReadComponentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadComponentStatusResponse { Ok(crate::v1_15::api::core::v1::ComponentStatus), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -177,6 +184,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_component_status( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -195,12 +203,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::watch_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchComponentStatusResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/config_map.rs b/src/v1_15/api/core/v1/config_map.rs index 97452a37a1..2ae9639697 100644 --- a/src/v1_15/api/core/v1/config_map.rs +++ b/src/v1_15/api/core/v1/config_map.rs @@ -33,6 +33,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_config_map( namespace: &str, body: &crate::v1_15::api::core::v1::ConfigMap, @@ -69,6 +70,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedConfigMapOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedConfigMapResponse { Ok(crate::v1_15::api::core::v1::ConfigMap), @@ -88,6 +91,7 @@ pub enum CreateNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ConfigMap { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_config_map( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_collection_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedConfigMapResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_config_map( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedConfigMapResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_config_map_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListConfigMapForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_config_map( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedConfigMapResponse { Ok(crate::v1_15::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_config_map( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::patch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedConfigMapResponse { Ok(crate::v1_15::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_config_map( name: &str, namespace: &str, @@ -607,6 +627,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedConfigMapOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -618,12 +639,14 @@ pub struct ReadNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedConfigMapResponse { Ok(crate::v1_15::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +698,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_config_map( name: &str, namespace: &str, @@ -713,6 +737,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedConfigMapOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -724,6 +749,7 @@ pub struct ReplaceNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedConfigMapResponse { Ok(crate::v1_15::api::core::v1::ConfigMap), @@ -731,6 +757,7 @@ pub enum ReplaceNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -782,6 +809,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_config_map_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -800,12 +828,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchConfigMapForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_config_map( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -876,12 +907,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedConfigMapResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/endpoints.rs b/src/v1_15/api/core/v1/endpoints.rs index d0fb71953b..9bac5c1b63 100644 --- a/src/v1_15/api/core/v1/endpoints.rs +++ b/src/v1_15/api/core/v1/endpoints.rs @@ -41,6 +41,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_endpoints( namespace: &str, body: &crate::v1_15::api::core::v1::Endpoints, @@ -77,6 +78,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEndpointsOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -88,6 +90,7 @@ pub struct CreateNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEndpointsResponse { Ok(crate::v1_15::api::core::v1::Endpoints), @@ -96,6 +99,7 @@ pub enum CreateNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -161,6 +165,7 @@ impl Endpoints { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_endpoints( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -184,6 +189,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_collection_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEndpointsResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -191,6 +197,7 @@ pub enum DeleteCollectionNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -253,6 +260,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_endpoints( name: &str, namespace: &str, @@ -274,6 +282,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEndpointsResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -282,6 +291,7 @@ pub enum DeleteNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -346,6 +356,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_endpoints_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -364,12 +375,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEndpointsForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -417,6 +430,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_endpoints( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -438,12 +452,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEndpointsResponse { Ok(crate::v1_15::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -495,6 +511,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_endpoints( name: &str, namespace: &str, @@ -524,12 +541,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::patch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEndpointsResponse { Ok(crate::v1_15::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -579,6 +598,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_endpoints( name: &str, namespace: &str, @@ -615,6 +635,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEndpointsOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -626,12 +647,14 @@ pub struct ReadNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEndpointsResponse { Ok(crate::v1_15::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -683,6 +706,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_endpoints( name: &str, namespace: &str, @@ -721,6 +745,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEndpointsOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -732,6 +757,7 @@ pub struct ReplaceNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEndpointsResponse { Ok(crate::v1_15::api::core::v1::Endpoints), @@ -739,6 +765,7 @@ pub enum ReplaceNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -790,6 +817,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_endpoints_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -808,12 +836,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEndpointsForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -863,6 +893,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_endpoints( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -884,12 +915,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEndpointsResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/event.rs b/src/v1_15/api/core/v1/event.rs index efdea92e29..f0b9e73b05 100644 --- a/src/v1_15/api/core/v1/event.rs +++ b/src/v1_15/api/core/v1/event.rs @@ -69,6 +69,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_15::api::core::v1::Event, @@ -105,6 +106,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -116,6 +118,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_15::api::core::v1::Event), @@ -124,6 +127,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -189,6 +193,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -212,6 +217,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -219,6 +225,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -281,6 +288,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -302,6 +310,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -310,6 +319,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -374,6 +384,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -392,12 +403,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +458,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -466,12 +480,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_15::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -523,6 +539,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -552,12 +569,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_15::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -607,6 +626,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -643,6 +663,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -654,12 +675,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_15::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -711,6 +734,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -749,6 +773,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -760,6 +785,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_15::api::core::v1::Event), @@ -767,6 +793,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -818,6 +845,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -836,12 +864,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -891,6 +921,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -912,12 +943,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/limit_range.rs b/src/v1_15/api/core/v1/limit_range.rs index 89b79d4dec..4030e50bc3 100644 --- a/src/v1_15/api/core/v1/limit_range.rs +++ b/src/v1_15/api/core/v1/limit_range.rs @@ -30,6 +30,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_limit_range( namespace: &str, body: &crate::v1_15::api::core::v1::LimitRange, @@ -66,6 +67,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLimitRangeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLimitRangeResponse { Ok(crate::v1_15::api::core::v1::LimitRange), @@ -85,6 +88,7 @@ pub enum CreateNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl LimitRange { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_limit_range( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_collection_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLimitRangeResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_limit_range( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLimitRangeResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_limit_range_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLimitRangeForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_limit_range( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -427,12 +441,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLimitRangeResponse { Ok(crate::v1_15::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_limit_range( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::patch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLimitRangeResponse { Ok(crate::v1_15::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_limit_range( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLimitRangeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLimitRangeResponse { Ok(crate::v1_15::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_limit_range( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLimitRangeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLimitRangeResponse { Ok(crate::v1_15::api::core::v1::LimitRange), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -779,6 +806,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_limit_range_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -797,12 +825,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLimitRangeForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -852,6 +882,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_limit_range( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -873,12 +904,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLimitRangeResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/mod.rs b/src/v1_15/api/core/v1/mod.rs index 73bfd77c0a..51659b5c3a 100644 --- a/src/v1_15/api/core/v1/mod.rs +++ b/src/v1_15/api/core/v1/mod.rs @@ -1,1109 +1,749 @@ mod aws_elastic_block_store_volume_source; -pub use self::aws_elastic_block_store_volume_source::{ - AWSElasticBlockStoreVolumeSource, -}; +pub use self::aws_elastic_block_store_volume_source::AWSElasticBlockStoreVolumeSource; mod affinity; -pub use self::affinity::{ - Affinity, -}; +pub use self::affinity::Affinity; mod attached_volume; -pub use self::attached_volume::{ - AttachedVolume, -}; +pub use self::attached_volume::AttachedVolume; mod azure_disk_volume_source; -pub use self::azure_disk_volume_source::{ - AzureDiskVolumeSource, -}; +pub use self::azure_disk_volume_source::AzureDiskVolumeSource; mod azure_file_persistent_volume_source; -pub use self::azure_file_persistent_volume_source::{ - AzureFilePersistentVolumeSource, -}; +pub use self::azure_file_persistent_volume_source::AzureFilePersistentVolumeSource; mod azure_file_volume_source; -pub use self::azure_file_volume_source::{ - AzureFileVolumeSource, -}; +pub use self::azure_file_volume_source::AzureFileVolumeSource; mod binding; -pub use self::binding::{ - Binding, - CreateNamespacedBindingOptional, CreateNamespacedBindingResponse, - CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse, -}; +pub use self::binding::Binding; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedBindingOptional, CreateNamespacedBindingResponse}; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse}; mod csi_persistent_volume_source; -pub use self::csi_persistent_volume_source::{ - CSIPersistentVolumeSource, -}; +pub use self::csi_persistent_volume_source::CSIPersistentVolumeSource; mod csi_volume_source; -pub use self::csi_volume_source::{ - CSIVolumeSource, -}; +pub use self::csi_volume_source::CSIVolumeSource; mod capabilities; -pub use self::capabilities::{ - Capabilities, -}; +pub use self::capabilities::Capabilities; mod ceph_fs_persistent_volume_source; -pub use self::ceph_fs_persistent_volume_source::{ - CephFSPersistentVolumeSource, -}; +pub use self::ceph_fs_persistent_volume_source::CephFSPersistentVolumeSource; mod ceph_fs_volume_source; -pub use self::ceph_fs_volume_source::{ - CephFSVolumeSource, -}; +pub use self::ceph_fs_volume_source::CephFSVolumeSource; mod cinder_persistent_volume_source; -pub use self::cinder_persistent_volume_source::{ - CinderPersistentVolumeSource, -}; +pub use self::cinder_persistent_volume_source::CinderPersistentVolumeSource; mod cinder_volume_source; -pub use self::cinder_volume_source::{ - CinderVolumeSource, -}; +pub use self::cinder_volume_source::CinderVolumeSource; mod client_ip_config; -pub use self::client_ip_config::{ - ClientIPConfig, -}; +pub use self::client_ip_config::ClientIPConfig; mod component_condition; -pub use self::component_condition::{ - ComponentCondition, -}; +pub use self::component_condition::ComponentCondition; mod component_status; -pub use self::component_status::{ - ComponentStatus, - ListComponentStatusResponse, - ReadComponentStatusOptional, ReadComponentStatusResponse, - WatchComponentStatusResponse, -}; +pub use self::component_status::ComponentStatus; +#[cfg(feature = "api")] pub use self::component_status::ListComponentStatusResponse; +#[cfg(feature = "api")] pub use self::component_status::{ReadComponentStatusOptional, ReadComponentStatusResponse}; +#[cfg(feature = "api")] pub use self::component_status::WatchComponentStatusResponse; mod component_status_list; -pub use self::component_status_list::{ - ComponentStatusList, -}; +pub use self::component_status_list::ComponentStatusList; mod config_map; -pub use self::config_map::{ - ConfigMap, - CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse, - DeleteCollectionNamespacedConfigMapResponse, - DeleteNamespacedConfigMapResponse, - ListConfigMapForAllNamespacesResponse, - ListNamespacedConfigMapResponse, - PatchNamespacedConfigMapResponse, - ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse, - ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse, - WatchConfigMapForAllNamespacesResponse, - WatchNamespacedConfigMapResponse, -}; +pub use self::config_map::ConfigMap; +#[cfg(feature = "api")] pub use self::config_map::{CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::DeleteCollectionNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::DeleteNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::ListConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::ListNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::PatchNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::{ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::{ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::WatchConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::WatchNamespacedConfigMapResponse; mod config_map_env_source; -pub use self::config_map_env_source::{ - ConfigMapEnvSource, -}; +pub use self::config_map_env_source::ConfigMapEnvSource; mod config_map_key_selector; -pub use self::config_map_key_selector::{ - ConfigMapKeySelector, -}; +pub use self::config_map_key_selector::ConfigMapKeySelector; mod config_map_list; -pub use self::config_map_list::{ - ConfigMapList, -}; +pub use self::config_map_list::ConfigMapList; mod config_map_node_config_source; -pub use self::config_map_node_config_source::{ - ConfigMapNodeConfigSource, -}; +pub use self::config_map_node_config_source::ConfigMapNodeConfigSource; mod config_map_projection; -pub use self::config_map_projection::{ - ConfigMapProjection, -}; +pub use self::config_map_projection::ConfigMapProjection; mod config_map_volume_source; -pub use self::config_map_volume_source::{ - ConfigMapVolumeSource, -}; +pub use self::config_map_volume_source::ConfigMapVolumeSource; mod container; -pub use self::container::{ - Container, -}; +pub use self::container::Container; mod container_image; -pub use self::container_image::{ - ContainerImage, -}; +pub use self::container_image::ContainerImage; mod container_port; -pub use self::container_port::{ - ContainerPort, -}; +pub use self::container_port::ContainerPort; mod container_state; -pub use self::container_state::{ - ContainerState, -}; +pub use self::container_state::ContainerState; mod container_state_running; -pub use self::container_state_running::{ - ContainerStateRunning, -}; +pub use self::container_state_running::ContainerStateRunning; mod container_state_terminated; -pub use self::container_state_terminated::{ - ContainerStateTerminated, -}; +pub use self::container_state_terminated::ContainerStateTerminated; mod container_state_waiting; -pub use self::container_state_waiting::{ - ContainerStateWaiting, -}; +pub use self::container_state_waiting::ContainerStateWaiting; mod container_status; -pub use self::container_status::{ - ContainerStatus, -}; +pub use self::container_status::ContainerStatus; mod daemon_endpoint; -pub use self::daemon_endpoint::{ - DaemonEndpoint, -}; +pub use self::daemon_endpoint::DaemonEndpoint; mod downward_api_projection; -pub use self::downward_api_projection::{ - DownwardAPIProjection, -}; +pub use self::downward_api_projection::DownwardAPIProjection; mod downward_api_volume_file; -pub use self::downward_api_volume_file::{ - DownwardAPIVolumeFile, -}; +pub use self::downward_api_volume_file::DownwardAPIVolumeFile; mod downward_api_volume_source; -pub use self::downward_api_volume_source::{ - DownwardAPIVolumeSource, -}; +pub use self::downward_api_volume_source::DownwardAPIVolumeSource; mod empty_dir_volume_source; -pub use self::empty_dir_volume_source::{ - EmptyDirVolumeSource, -}; +pub use self::empty_dir_volume_source::EmptyDirVolumeSource; mod endpoint_address; -pub use self::endpoint_address::{ - EndpointAddress, -}; +pub use self::endpoint_address::EndpointAddress; mod endpoint_port; -pub use self::endpoint_port::{ - EndpointPort, -}; +pub use self::endpoint_port::EndpointPort; mod endpoint_subset; -pub use self::endpoint_subset::{ - EndpointSubset, -}; +pub use self::endpoint_subset::EndpointSubset; mod endpoints; -pub use self::endpoints::{ - Endpoints, - CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse, - DeleteCollectionNamespacedEndpointsResponse, - DeleteNamespacedEndpointsResponse, - ListEndpointsForAllNamespacesResponse, - ListNamespacedEndpointsResponse, - PatchNamespacedEndpointsResponse, - ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse, - ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse, - WatchEndpointsForAllNamespacesResponse, - WatchNamespacedEndpointsResponse, -}; +pub use self::endpoints::Endpoints; +#[cfg(feature = "api")] pub use self::endpoints::{CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::DeleteCollectionNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::DeleteNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::PatchNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::{ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::{ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::WatchEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::WatchNamespacedEndpointsResponse; mod endpoints_list; -pub use self::endpoints_list::{ - EndpointsList, -}; +pub use self::endpoints_list::EndpointsList; mod env_from_source; -pub use self::env_from_source::{ - EnvFromSource, -}; +pub use self::env_from_source::EnvFromSource; mod env_var; -pub use self::env_var::{ - EnvVar, -}; +pub use self::env_var::EnvVar; mod env_var_source; -pub use self::env_var_source::{ - EnvVarSource, -}; +pub use self::env_var_source::EnvVarSource; mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; mod event_source; -pub use self::event_source::{ - EventSource, -}; +pub use self::event_source::EventSource; mod exec_action; -pub use self::exec_action::{ - ExecAction, -}; +pub use self::exec_action::ExecAction; mod fc_volume_source; -pub use self::fc_volume_source::{ - FCVolumeSource, -}; +pub use self::fc_volume_source::FCVolumeSource; mod flex_persistent_volume_source; -pub use self::flex_persistent_volume_source::{ - FlexPersistentVolumeSource, -}; +pub use self::flex_persistent_volume_source::FlexPersistentVolumeSource; mod flex_volume_source; -pub use self::flex_volume_source::{ - FlexVolumeSource, -}; +pub use self::flex_volume_source::FlexVolumeSource; mod flocker_volume_source; -pub use self::flocker_volume_source::{ - FlockerVolumeSource, -}; +pub use self::flocker_volume_source::FlockerVolumeSource; mod gce_persistent_disk_volume_source; -pub use self::gce_persistent_disk_volume_source::{ - GCEPersistentDiskVolumeSource, -}; +pub use self::gce_persistent_disk_volume_source::GCEPersistentDiskVolumeSource; mod git_repo_volume_source; -pub use self::git_repo_volume_source::{ - GitRepoVolumeSource, -}; +pub use self::git_repo_volume_source::GitRepoVolumeSource; mod glusterfs_persistent_volume_source; -pub use self::glusterfs_persistent_volume_source::{ - GlusterfsPersistentVolumeSource, -}; +pub use self::glusterfs_persistent_volume_source::GlusterfsPersistentVolumeSource; mod glusterfs_volume_source; -pub use self::glusterfs_volume_source::{ - GlusterfsVolumeSource, -}; +pub use self::glusterfs_volume_source::GlusterfsVolumeSource; mod http_get_action; -pub use self::http_get_action::{ - HTTPGetAction, -}; +pub use self::http_get_action::HTTPGetAction; mod http_header; -pub use self::http_header::{ - HTTPHeader, -}; +pub use self::http_header::HTTPHeader; mod handler; -pub use self::handler::{ - Handler, -}; +pub use self::handler::Handler; mod host_alias; -pub use self::host_alias::{ - HostAlias, -}; +pub use self::host_alias::HostAlias; mod host_path_volume_source; -pub use self::host_path_volume_source::{ - HostPathVolumeSource, -}; +pub use self::host_path_volume_source::HostPathVolumeSource; mod iscsi_persistent_volume_source; -pub use self::iscsi_persistent_volume_source::{ - ISCSIPersistentVolumeSource, -}; +pub use self::iscsi_persistent_volume_source::ISCSIPersistentVolumeSource; mod iscsi_volume_source; -pub use self::iscsi_volume_source::{ - ISCSIVolumeSource, -}; +pub use self::iscsi_volume_source::ISCSIVolumeSource; mod key_to_path; -pub use self::key_to_path::{ - KeyToPath, -}; +pub use self::key_to_path::KeyToPath; mod lifecycle; -pub use self::lifecycle::{ - Lifecycle, -}; +pub use self::lifecycle::Lifecycle; mod limit_range; -pub use self::limit_range::{ - LimitRange, - CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse, - DeleteCollectionNamespacedLimitRangeResponse, - DeleteNamespacedLimitRangeResponse, - ListLimitRangeForAllNamespacesResponse, - ListNamespacedLimitRangeResponse, - PatchNamespacedLimitRangeResponse, - ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse, - ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse, - WatchLimitRangeForAllNamespacesResponse, - WatchNamespacedLimitRangeResponse, -}; +pub use self::limit_range::LimitRange; +#[cfg(feature = "api")] pub use self::limit_range::{CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::DeleteCollectionNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::DeleteNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::PatchNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::{ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::{ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::WatchLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::WatchNamespacedLimitRangeResponse; mod limit_range_item; -pub use self::limit_range_item::{ - LimitRangeItem, -}; +pub use self::limit_range_item::LimitRangeItem; mod limit_range_list; -pub use self::limit_range_list::{ - LimitRangeList, -}; +pub use self::limit_range_list::LimitRangeList; mod limit_range_spec; -pub use self::limit_range_spec::{ - LimitRangeSpec, -}; +pub use self::limit_range_spec::LimitRangeSpec; mod load_balancer_ingress; -pub use self::load_balancer_ingress::{ - LoadBalancerIngress, -}; +pub use self::load_balancer_ingress::LoadBalancerIngress; mod load_balancer_status; -pub use self::load_balancer_status::{ - LoadBalancerStatus, -}; +pub use self::load_balancer_status::LoadBalancerStatus; mod local_object_reference; -pub use self::local_object_reference::{ - LocalObjectReference, -}; +pub use self::local_object_reference::LocalObjectReference; mod local_volume_source; -pub use self::local_volume_source::{ - LocalVolumeSource, -}; +pub use self::local_volume_source::LocalVolumeSource; mod nfs_volume_source; -pub use self::nfs_volume_source::{ - NFSVolumeSource, -}; +pub use self::nfs_volume_source::NFSVolumeSource; mod namespace; -pub use self::namespace::{ - Namespace, - CreateNamespaceOptional, CreateNamespaceResponse, - DeleteNamespaceResponse, - ListNamespaceResponse, - PatchNamespaceResponse, - PatchNamespaceStatusResponse, - ReadNamespaceOptional, ReadNamespaceResponse, - ReadNamespaceStatusOptional, ReadNamespaceStatusResponse, - ReplaceNamespaceOptional, ReplaceNamespaceResponse, - ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse, - ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse, - WatchNamespaceResponse, -}; +pub use self::namespace::Namespace; +#[cfg(feature = "api")] pub use self::namespace::{CreateNamespaceOptional, CreateNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::DeleteNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::ListNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceStatusResponse; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceOptional, ReadNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceStatusOptional, ReadNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceOptional, ReplaceNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::WatchNamespaceResponse; mod namespace_list; -pub use self::namespace_list::{ - NamespaceList, -}; +pub use self::namespace_list::NamespaceList; mod namespace_spec; -pub use self::namespace_spec::{ - NamespaceSpec, -}; +pub use self::namespace_spec::NamespaceSpec; mod namespace_status; -pub use self::namespace_status::{ - NamespaceStatus, -}; +pub use self::namespace_status::NamespaceStatus; mod node; -pub use self::node::{ - Node, - ConnectDeleteNodeProxyOptional, - ConnectDeleteNodeProxyWithPathOptional, - ConnectGetNodeProxyOptional, - ConnectGetNodeProxyWithPathOptional, - ConnectPatchNodeProxyOptional, - ConnectPatchNodeProxyWithPathOptional, - ConnectPostNodeProxyOptional, - ConnectPostNodeProxyWithPathOptional, - ConnectPutNodeProxyOptional, - ConnectPutNodeProxyWithPathOptional, - CreateNodeOptional, CreateNodeResponse, - DeleteCollectionNodeResponse, - DeleteNodeResponse, - ListNodeResponse, - PatchNodeResponse, - PatchNodeStatusResponse, - ReadNodeOptional, ReadNodeResponse, - ReadNodeStatusOptional, ReadNodeStatusResponse, - ReplaceNodeOptional, ReplaceNodeResponse, - ReplaceNodeStatusOptional, ReplaceNodeStatusResponse, - WatchNodeResponse, -}; +pub use self::node::Node; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::{CreateNodeOptional, CreateNodeResponse}; +#[cfg(feature = "api")] pub use self::node::DeleteCollectionNodeResponse; +#[cfg(feature = "api")] pub use self::node::DeleteNodeResponse; +#[cfg(feature = "api")] pub use self::node::ListNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeStatusResponse; +#[cfg(feature = "api")] pub use self::node::{ReadNodeOptional, ReadNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReadNodeStatusOptional, ReadNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeOptional, ReplaceNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeStatusOptional, ReplaceNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::WatchNodeResponse; mod node_address; -pub use self::node_address::{ - NodeAddress, -}; +pub use self::node_address::NodeAddress; mod node_affinity; -pub use self::node_affinity::{ - NodeAffinity, -}; +pub use self::node_affinity::NodeAffinity; mod node_condition; -pub use self::node_condition::{ - NodeCondition, -}; +pub use self::node_condition::NodeCondition; mod node_config_source; -pub use self::node_config_source::{ - NodeConfigSource, -}; +pub use self::node_config_source::NodeConfigSource; mod node_config_status; -pub use self::node_config_status::{ - NodeConfigStatus, -}; +pub use self::node_config_status::NodeConfigStatus; mod node_daemon_endpoints; -pub use self::node_daemon_endpoints::{ - NodeDaemonEndpoints, -}; +pub use self::node_daemon_endpoints::NodeDaemonEndpoints; mod node_list; -pub use self::node_list::{ - NodeList, -}; +pub use self::node_list::NodeList; mod node_selector; -pub use self::node_selector::{ - NodeSelector, -}; +pub use self::node_selector::NodeSelector; mod node_selector_requirement; -pub use self::node_selector_requirement::{ - NodeSelectorRequirement, -}; +pub use self::node_selector_requirement::NodeSelectorRequirement; mod node_selector_term; -pub use self::node_selector_term::{ - NodeSelectorTerm, -}; +pub use self::node_selector_term::NodeSelectorTerm; mod node_spec; -pub use self::node_spec::{ - NodeSpec, -}; +pub use self::node_spec::NodeSpec; mod node_status; -pub use self::node_status::{ - NodeStatus, -}; +pub use self::node_status::NodeStatus; mod node_system_info; -pub use self::node_system_info::{ - NodeSystemInfo, -}; +pub use self::node_system_info::NodeSystemInfo; mod object_field_selector; -pub use self::object_field_selector::{ - ObjectFieldSelector, -}; +pub use self::object_field_selector::ObjectFieldSelector; mod object_reference; -pub use self::object_reference::{ - ObjectReference, -}; +pub use self::object_reference::ObjectReference; mod persistent_volume; -pub use self::persistent_volume::{ - PersistentVolume, - CreatePersistentVolumeOptional, CreatePersistentVolumeResponse, - DeleteCollectionPersistentVolumeResponse, - DeletePersistentVolumeResponse, - ListPersistentVolumeResponse, - PatchPersistentVolumeResponse, - PatchPersistentVolumeStatusResponse, - ReadPersistentVolumeOptional, ReadPersistentVolumeResponse, - ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse, - ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse, - ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse, - WatchPersistentVolumeResponse, -}; +pub use self::persistent_volume::PersistentVolume; +#[cfg(feature = "api")] pub use self::persistent_volume::{CreatePersistentVolumeOptional, CreatePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::DeleteCollectionPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::DeletePersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::ListPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeOptional, ReadPersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::WatchPersistentVolumeResponse; mod persistent_volume_claim; -pub use self::persistent_volume_claim::{ - PersistentVolumeClaim, - CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse, - DeleteCollectionNamespacedPersistentVolumeClaimResponse, - DeleteNamespacedPersistentVolumeClaimResponse, - ListNamespacedPersistentVolumeClaimResponse, - ListPersistentVolumeClaimForAllNamespacesResponse, - PatchNamespacedPersistentVolumeClaimResponse, - PatchNamespacedPersistentVolumeClaimStatusResponse, - ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse, - ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse, - ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse, - ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse, - WatchNamespacedPersistentVolumeClaimResponse, - WatchPersistentVolumeClaimForAllNamespacesResponse, -}; +pub use self::persistent_volume_claim::PersistentVolumeClaim; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteCollectionNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListPersistentVolumeClaimForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchPersistentVolumeClaimForAllNamespacesResponse; mod persistent_volume_claim_condition; -pub use self::persistent_volume_claim_condition::{ - PersistentVolumeClaimCondition, -}; +pub use self::persistent_volume_claim_condition::PersistentVolumeClaimCondition; mod persistent_volume_claim_list; -pub use self::persistent_volume_claim_list::{ - PersistentVolumeClaimList, -}; +pub use self::persistent_volume_claim_list::PersistentVolumeClaimList; mod persistent_volume_claim_spec; -pub use self::persistent_volume_claim_spec::{ - PersistentVolumeClaimSpec, -}; +pub use self::persistent_volume_claim_spec::PersistentVolumeClaimSpec; mod persistent_volume_claim_status; -pub use self::persistent_volume_claim_status::{ - PersistentVolumeClaimStatus, -}; +pub use self::persistent_volume_claim_status::PersistentVolumeClaimStatus; mod persistent_volume_claim_volume_source; -pub use self::persistent_volume_claim_volume_source::{ - PersistentVolumeClaimVolumeSource, -}; +pub use self::persistent_volume_claim_volume_source::PersistentVolumeClaimVolumeSource; mod persistent_volume_list; -pub use self::persistent_volume_list::{ - PersistentVolumeList, -}; +pub use self::persistent_volume_list::PersistentVolumeList; mod persistent_volume_spec; -pub use self::persistent_volume_spec::{ - PersistentVolumeSpec, -}; +pub use self::persistent_volume_spec::PersistentVolumeSpec; mod persistent_volume_status; -pub use self::persistent_volume_status::{ - PersistentVolumeStatus, -}; +pub use self::persistent_volume_status::PersistentVolumeStatus; mod photon_persistent_disk_volume_source; -pub use self::photon_persistent_disk_volume_source::{ - PhotonPersistentDiskVolumeSource, -}; +pub use self::photon_persistent_disk_volume_source::PhotonPersistentDiskVolumeSource; mod pod; -pub use self::pod::{ - Pod, - ConnectDeleteNamespacedPodProxyOptional, - ConnectDeleteNamespacedPodProxyWithPathOptional, - ConnectGetNamespacedPodAttachOptional, - ConnectGetNamespacedPodExecOptional, - ConnectGetNamespacedPodPortforwardOptional, - ConnectGetNamespacedPodProxyOptional, - ConnectGetNamespacedPodProxyWithPathOptional, - ConnectPatchNamespacedPodProxyOptional, - ConnectPatchNamespacedPodProxyWithPathOptional, - ConnectPostNamespacedPodAttachOptional, - ConnectPostNamespacedPodExecOptional, - ConnectPostNamespacedPodPortforwardOptional, - ConnectPostNamespacedPodProxyOptional, - ConnectPostNamespacedPodProxyWithPathOptional, - ConnectPutNamespacedPodProxyOptional, - ConnectPutNamespacedPodProxyWithPathOptional, - CreateNamespacedPodOptional, CreateNamespacedPodResponse, - DeleteCollectionNamespacedPodResponse, - DeleteNamespacedPodResponse, - ListNamespacedPodResponse, - ListPodForAllNamespacesResponse, - PatchNamespacedPodResponse, - PatchNamespacedPodStatusResponse, - ReadNamespacedPodOptional, ReadNamespacedPodResponse, - ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse, - ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse, - ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse, - ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse, - WatchNamespacedPodResponse, - WatchPodForAllNamespacesResponse, -}; +pub use self::pod::Pod; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::{CreateNamespacedPodOptional, CreateNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::DeleteCollectionNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::DeleteNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListPodForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodStatusResponse; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodOptional, ReadNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::WatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::WatchPodForAllNamespacesResponse; mod pod_affinity; -pub use self::pod_affinity::{ - PodAffinity, -}; +pub use self::pod_affinity::PodAffinity; mod pod_affinity_term; -pub use self::pod_affinity_term::{ - PodAffinityTerm, -}; +pub use self::pod_affinity_term::PodAffinityTerm; mod pod_anti_affinity; -pub use self::pod_anti_affinity::{ - PodAntiAffinity, -}; +pub use self::pod_anti_affinity::PodAntiAffinity; mod pod_condition; -pub use self::pod_condition::{ - PodCondition, -}; +pub use self::pod_condition::PodCondition; mod pod_dns_config; -pub use self::pod_dns_config::{ - PodDNSConfig, -}; +pub use self::pod_dns_config::PodDNSConfig; mod pod_dns_config_option; -pub use self::pod_dns_config_option::{ - PodDNSConfigOption, -}; +pub use self::pod_dns_config_option::PodDNSConfigOption; mod pod_list; -pub use self::pod_list::{ - PodList, -}; +pub use self::pod_list::PodList; mod pod_readiness_gate; -pub use self::pod_readiness_gate::{ - PodReadinessGate, -}; +pub use self::pod_readiness_gate::PodReadinessGate; mod pod_security_context; -pub use self::pod_security_context::{ - PodSecurityContext, -}; +pub use self::pod_security_context::PodSecurityContext; mod pod_spec; -pub use self::pod_spec::{ - PodSpec, -}; +pub use self::pod_spec::PodSpec; mod pod_status; -pub use self::pod_status::{ - PodStatus, -}; +pub use self::pod_status::PodStatus; mod pod_template; -pub use self::pod_template::{ - PodTemplate, - CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse, - DeleteCollectionNamespacedPodTemplateResponse, - DeleteNamespacedPodTemplateResponse, - ListNamespacedPodTemplateResponse, - ListPodTemplateForAllNamespacesResponse, - PatchNamespacedPodTemplateResponse, - ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse, - ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse, - WatchNamespacedPodTemplateResponse, - WatchPodTemplateForAllNamespacesResponse, -}; +pub use self::pod_template::PodTemplate; +#[cfg(feature = "api")] pub use self::pod_template::{CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::DeleteCollectionNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::DeleteNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListPodTemplateForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_template::PatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::{ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::{ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::WatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::WatchPodTemplateForAllNamespacesResponse; mod pod_template_list; -pub use self::pod_template_list::{ - PodTemplateList, -}; +pub use self::pod_template_list::PodTemplateList; mod pod_template_spec; -pub use self::pod_template_spec::{ - PodTemplateSpec, -}; +pub use self::pod_template_spec::PodTemplateSpec; mod portworx_volume_source; -pub use self::portworx_volume_source::{ - PortworxVolumeSource, -}; +pub use self::portworx_volume_source::PortworxVolumeSource; mod preferred_scheduling_term; -pub use self::preferred_scheduling_term::{ - PreferredSchedulingTerm, -}; +pub use self::preferred_scheduling_term::PreferredSchedulingTerm; mod probe; -pub use self::probe::{ - Probe, -}; +pub use self::probe::Probe; mod projected_volume_source; -pub use self::projected_volume_source::{ - ProjectedVolumeSource, -}; +pub use self::projected_volume_source::ProjectedVolumeSource; mod quobyte_volume_source; -pub use self::quobyte_volume_source::{ - QuobyteVolumeSource, -}; +pub use self::quobyte_volume_source::QuobyteVolumeSource; mod rbd_persistent_volume_source; -pub use self::rbd_persistent_volume_source::{ - RBDPersistentVolumeSource, -}; +pub use self::rbd_persistent_volume_source::RBDPersistentVolumeSource; mod rbd_volume_source; -pub use self::rbd_volume_source::{ - RBDVolumeSource, -}; +pub use self::rbd_volume_source::RBDVolumeSource; mod replication_controller; -pub use self::replication_controller::{ - ReplicationController, - CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse, - DeleteCollectionNamespacedReplicationControllerResponse, - DeleteNamespacedReplicationControllerResponse, - ListNamespacedReplicationControllerResponse, - ListReplicationControllerForAllNamespacesResponse, - PatchNamespacedReplicationControllerResponse, - PatchNamespacedReplicationControllerStatusResponse, - ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse, - ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse, - ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse, - ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse, - WatchNamespacedReplicationControllerResponse, - WatchReplicationControllerForAllNamespacesResponse, -}; +pub use self::replication_controller::ReplicationController; +#[cfg(feature = "api")] pub use self::replication_controller::{CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteCollectionNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListReplicationControllerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerStatusResponse; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::WatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::WatchReplicationControllerForAllNamespacesResponse; mod replication_controller_condition; -pub use self::replication_controller_condition::{ - ReplicationControllerCondition, -}; +pub use self::replication_controller_condition::ReplicationControllerCondition; mod replication_controller_list; -pub use self::replication_controller_list::{ - ReplicationControllerList, -}; +pub use self::replication_controller_list::ReplicationControllerList; mod replication_controller_spec; -pub use self::replication_controller_spec::{ - ReplicationControllerSpec, -}; +pub use self::replication_controller_spec::ReplicationControllerSpec; mod replication_controller_status; -pub use self::replication_controller_status::{ - ReplicationControllerStatus, -}; +pub use self::replication_controller_status::ReplicationControllerStatus; mod resource_field_selector; -pub use self::resource_field_selector::{ - ResourceFieldSelector, -}; +pub use self::resource_field_selector::ResourceFieldSelector; mod resource_quota; -pub use self::resource_quota::{ - ResourceQuota, - CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse, - DeleteCollectionNamespacedResourceQuotaResponse, - DeleteNamespacedResourceQuotaResponse, - ListNamespacedResourceQuotaResponse, - ListResourceQuotaForAllNamespacesResponse, - PatchNamespacedResourceQuotaResponse, - PatchNamespacedResourceQuotaStatusResponse, - ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse, - ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse, - ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse, - ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse, - WatchNamespacedResourceQuotaResponse, - WatchResourceQuotaForAllNamespacesResponse, -}; +pub use self::resource_quota::ResourceQuota; +#[cfg(feature = "api")] pub use self::resource_quota::{CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteCollectionNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListResourceQuotaForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaStatusResponse; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::WatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::WatchResourceQuotaForAllNamespacesResponse; mod resource_quota_list; -pub use self::resource_quota_list::{ - ResourceQuotaList, -}; +pub use self::resource_quota_list::ResourceQuotaList; mod resource_quota_spec; -pub use self::resource_quota_spec::{ - ResourceQuotaSpec, -}; +pub use self::resource_quota_spec::ResourceQuotaSpec; mod resource_quota_status; -pub use self::resource_quota_status::{ - ResourceQuotaStatus, -}; +pub use self::resource_quota_status::ResourceQuotaStatus; mod resource_requirements; -pub use self::resource_requirements::{ - ResourceRequirements, -}; +pub use self::resource_requirements::ResourceRequirements; mod se_linux_options; -pub use self::se_linux_options::{ - SELinuxOptions, -}; +pub use self::se_linux_options::SELinuxOptions; mod scale_io_persistent_volume_source; -pub use self::scale_io_persistent_volume_source::{ - ScaleIOPersistentVolumeSource, -}; +pub use self::scale_io_persistent_volume_source::ScaleIOPersistentVolumeSource; mod scale_io_volume_source; -pub use self::scale_io_volume_source::{ - ScaleIOVolumeSource, -}; +pub use self::scale_io_volume_source::ScaleIOVolumeSource; mod scope_selector; -pub use self::scope_selector::{ - ScopeSelector, -}; +pub use self::scope_selector::ScopeSelector; mod scoped_resource_selector_requirement; -pub use self::scoped_resource_selector_requirement::{ - ScopedResourceSelectorRequirement, -}; +pub use self::scoped_resource_selector_requirement::ScopedResourceSelectorRequirement; mod secret; -pub use self::secret::{ - Secret, - CreateNamespacedSecretOptional, CreateNamespacedSecretResponse, - DeleteCollectionNamespacedSecretResponse, - DeleteNamespacedSecretResponse, - ListNamespacedSecretResponse, - ListSecretForAllNamespacesResponse, - PatchNamespacedSecretResponse, - ReadNamespacedSecretOptional, ReadNamespacedSecretResponse, - ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse, - WatchNamespacedSecretResponse, - WatchSecretForAllNamespacesResponse, -}; +pub use self::secret::Secret; +#[cfg(feature = "api")] pub use self::secret::{CreateNamespacedSecretOptional, CreateNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::DeleteCollectionNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::DeleteNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListSecretForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::secret::PatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::{ReadNamespacedSecretOptional, ReadNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::{ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::WatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::WatchSecretForAllNamespacesResponse; mod secret_env_source; -pub use self::secret_env_source::{ - SecretEnvSource, -}; +pub use self::secret_env_source::SecretEnvSource; mod secret_key_selector; -pub use self::secret_key_selector::{ - SecretKeySelector, -}; +pub use self::secret_key_selector::SecretKeySelector; mod secret_list; -pub use self::secret_list::{ - SecretList, -}; +pub use self::secret_list::SecretList; mod secret_projection; -pub use self::secret_projection::{ - SecretProjection, -}; +pub use self::secret_projection::SecretProjection; mod secret_reference; -pub use self::secret_reference::{ - SecretReference, -}; +pub use self::secret_reference::SecretReference; mod secret_volume_source; -pub use self::secret_volume_source::{ - SecretVolumeSource, -}; +pub use self::secret_volume_source::SecretVolumeSource; mod security_context; -pub use self::security_context::{ - SecurityContext, -}; +pub use self::security_context::SecurityContext; mod service; -pub use self::service::{ - Service, - ConnectDeleteNamespacedServiceProxyOptional, - ConnectDeleteNamespacedServiceProxyWithPathOptional, - ConnectGetNamespacedServiceProxyOptional, - ConnectGetNamespacedServiceProxyWithPathOptional, - ConnectPatchNamespacedServiceProxyOptional, - ConnectPatchNamespacedServiceProxyWithPathOptional, - ConnectPostNamespacedServiceProxyOptional, - ConnectPostNamespacedServiceProxyWithPathOptional, - ConnectPutNamespacedServiceProxyOptional, - ConnectPutNamespacedServiceProxyWithPathOptional, - CreateNamespacedServiceOptional, CreateNamespacedServiceResponse, - DeleteNamespacedServiceResponse, - ListNamespacedServiceResponse, - ListServiceForAllNamespacesResponse, - PatchNamespacedServiceResponse, - PatchNamespacedServiceStatusResponse, - ReadNamespacedServiceOptional, ReadNamespacedServiceResponse, - ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse, - ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse, - ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse, - WatchNamespacedServiceResponse, - WatchServiceForAllNamespacesResponse, -}; +pub use self::service::Service; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::{CreateNamespacedServiceOptional, CreateNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::DeleteNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListServiceForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceStatusResponse; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceOptional, ReadNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::WatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::WatchServiceForAllNamespacesResponse; mod service_account; -pub use self::service_account::{ - ServiceAccount, - CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse, - DeleteCollectionNamespacedServiceAccountResponse, - DeleteNamespacedServiceAccountResponse, - ListNamespacedServiceAccountResponse, - ListServiceAccountForAllNamespacesResponse, - PatchNamespacedServiceAccountResponse, - ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse, - ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse, - WatchNamespacedServiceAccountResponse, - WatchServiceAccountForAllNamespacesResponse, -}; +pub use self::service_account::ServiceAccount; +#[cfg(feature = "api")] pub use self::service_account::{CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::DeleteCollectionNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::DeleteNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListServiceAccountForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service_account::PatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::{ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::{ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::WatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::WatchServiceAccountForAllNamespacesResponse; mod service_account_list; -pub use self::service_account_list::{ - ServiceAccountList, -}; +pub use self::service_account_list::ServiceAccountList; mod service_account_token_projection; -pub use self::service_account_token_projection::{ - ServiceAccountTokenProjection, -}; +pub use self::service_account_token_projection::ServiceAccountTokenProjection; mod service_list; -pub use self::service_list::{ - ServiceList, -}; +pub use self::service_list::ServiceList; mod service_port; -pub use self::service_port::{ - ServicePort, -}; +pub use self::service_port::ServicePort; mod service_spec; -pub use self::service_spec::{ - ServiceSpec, -}; +pub use self::service_spec::ServiceSpec; mod service_status; -pub use self::service_status::{ - ServiceStatus, -}; +pub use self::service_status::ServiceStatus; mod session_affinity_config; -pub use self::session_affinity_config::{ - SessionAffinityConfig, -}; +pub use self::session_affinity_config::SessionAffinityConfig; mod storage_os_persistent_volume_source; -pub use self::storage_os_persistent_volume_source::{ - StorageOSPersistentVolumeSource, -}; +pub use self::storage_os_persistent_volume_source::StorageOSPersistentVolumeSource; mod storage_os_volume_source; -pub use self::storage_os_volume_source::{ - StorageOSVolumeSource, -}; +pub use self::storage_os_volume_source::StorageOSVolumeSource; mod sysctl; -pub use self::sysctl::{ - Sysctl, -}; +pub use self::sysctl::Sysctl; mod tcp_socket_action; -pub use self::tcp_socket_action::{ - TCPSocketAction, -}; +pub use self::tcp_socket_action::TCPSocketAction; mod taint; -pub use self::taint::{ - Taint, -}; +pub use self::taint::Taint; mod toleration; -pub use self::toleration::{ - Toleration, -}; +pub use self::toleration::Toleration; mod topology_selector_label_requirement; -pub use self::topology_selector_label_requirement::{ - TopologySelectorLabelRequirement, -}; +pub use self::topology_selector_label_requirement::TopologySelectorLabelRequirement; mod topology_selector_term; -pub use self::topology_selector_term::{ - TopologySelectorTerm, -}; +pub use self::topology_selector_term::TopologySelectorTerm; mod typed_local_object_reference; -pub use self::typed_local_object_reference::{ - TypedLocalObjectReference, -}; +pub use self::typed_local_object_reference::TypedLocalObjectReference; mod volume; -pub use self::volume::{ - Volume, -}; +pub use self::volume::Volume; mod volume_device; -pub use self::volume_device::{ - VolumeDevice, -}; +pub use self::volume_device::VolumeDevice; mod volume_mount; -pub use self::volume_mount::{ - VolumeMount, -}; +pub use self::volume_mount::VolumeMount; mod volume_node_affinity; -pub use self::volume_node_affinity::{ - VolumeNodeAffinity, -}; +pub use self::volume_node_affinity::VolumeNodeAffinity; mod volume_projection; -pub use self::volume_projection::{ - VolumeProjection, -}; +pub use self::volume_projection::VolumeProjection; mod vsphere_virtual_disk_volume_source; -pub use self::vsphere_virtual_disk_volume_source::{ - VsphereVirtualDiskVolumeSource, -}; +pub use self::vsphere_virtual_disk_volume_source::VsphereVirtualDiskVolumeSource; mod weighted_pod_affinity_term; -pub use self::weighted_pod_affinity_term::{ - WeightedPodAffinityTerm, -}; +pub use self::weighted_pod_affinity_term::WeightedPodAffinityTerm; mod windows_security_context_options; -pub use self::windows_security_context_options::{ - WindowsSecurityContextOptions, -}; +pub use self::windows_security_context_options::WindowsSecurityContextOptions; diff --git a/src/v1_15/api/core/v1/namespace.rs b/src/v1_15/api/core/v1/namespace.rs index 25d37df1b9..dce0da2435 100644 --- a/src/v1_15/api/core/v1/namespace.rs +++ b/src/v1_15/api/core/v1/namespace.rs @@ -29,6 +29,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespace( body: &crate::v1_15::api::core::v1::Namespace, optional: CreateNamespaceOptional<'_>, @@ -62,6 +63,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespaceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespaceResponse { Ok(crate::v1_15::api::core::v1::Namespace), @@ -81,6 +84,7 @@ pub enum CreateNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespace( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::delete_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespaceResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespace( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -251,12 +259,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::list_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespaceResponse { Ok(crate::v1_15::api::core::v1::NamespaceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -304,6 +314,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -331,12 +342,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceResponse { Ok(crate::v1_15::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -384,6 +397,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace_status( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -411,12 +425,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceStatusResponse { Ok(crate::v1_15::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -462,6 +478,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace( name: &str, optional: ReadNamespaceOptional<'_>, @@ -496,6 +513,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -507,12 +525,14 @@ pub struct ReadNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceResponse { Ok(crate::v1_15::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -558,6 +578,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace_status( name: &str, optional: ReadNamespaceStatusOptional<'_>, @@ -584,6 +605,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -591,12 +613,14 @@ pub struct ReadNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceStatusResponse { Ok(crate::v1_15::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -644,6 +668,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace( name: &str, body: &crate::v1_15::api::core::v1::Namespace, @@ -680,6 +705,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -691,6 +717,7 @@ pub struct ReplaceNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceResponse { Ok(crate::v1_15::api::core::v1::Namespace), @@ -698,6 +725,7 @@ pub enum ReplaceNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -753,6 +781,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_finalize( name: &str, body: &crate::v1_15::api::core::v1::Namespace, @@ -789,6 +818,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceFinalizeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -800,6 +830,7 @@ pub struct ReplaceNamespaceFinalizeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceFinalizeResponse { Ok(crate::v1_15::api::core::v1::Namespace), @@ -807,6 +838,7 @@ pub enum ReplaceNamespaceFinalizeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceFinalizeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -862,6 +894,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_status( name: &str, body: &crate::v1_15::api::core::v1::Namespace, @@ -898,6 +931,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -909,6 +943,7 @@ pub struct ReplaceNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceStatusResponse { Ok(crate::v1_15::api::core::v1::Namespace), @@ -916,6 +951,7 @@ pub enum ReplaceNamespaceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -967,6 +1003,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespace( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -985,12 +1022,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::watch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespaceResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/node.rs b/src/v1_15/api/core/v1/node.rs index 101bc9b29e..b1ca6afbc2 100644 --- a/src/v1_15/api/core/v1/node.rs +++ b/src/v1_15/api/core/v1/node.rs @@ -29,6 +29,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy( name: &str, optional: ConnectDeleteNodeProxyOptional<'_>, @@ -52,6 +53,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -76,6 +78,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy_with_path( name: &str, path: &str, @@ -101,6 +104,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -121,6 +125,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy( name: &str, optional: ConnectGetNodeProxyOptional<'_>, @@ -144,6 +149,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -168,6 +174,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy_with_path( name: &str, path: &str, @@ -193,6 +200,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -213,6 +221,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy( name: &str, optional: ConnectPatchNodeProxyOptional<'_>, @@ -236,6 +245,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -260,6 +270,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy_with_path( name: &str, path: &str, @@ -285,6 +296,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -305,6 +317,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy( name: &str, optional: ConnectPostNodeProxyOptional<'_>, @@ -328,6 +341,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -352,6 +366,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy_with_path( name: &str, path: &str, @@ -377,6 +392,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -397,6 +413,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy( name: &str, optional: ConnectPutNodeProxyOptional<'_>, @@ -420,6 +437,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -444,6 +462,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy_with_path( name: &str, path: &str, @@ -469,6 +488,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -489,6 +509,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_node( body: &crate::v1_15::api::core::v1::Node, optional: CreateNodeOptional<'_>, @@ -522,6 +543,7 @@ impl Node { } /// Optional parameters of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -533,6 +555,7 @@ pub struct CreateNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNodeResponse { Ok(crate::v1_15::api::core::v1::Node), @@ -541,6 +564,7 @@ pub enum CreateNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -602,6 +626,7 @@ impl Node { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_node( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -622,6 +647,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_collection_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNodeResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -629,6 +655,7 @@ pub enum DeleteCollectionNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -687,6 +714,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_node( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -706,6 +734,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNodeResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -714,6 +743,7 @@ pub enum DeleteNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -778,6 +808,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_node( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -796,12 +827,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::list_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNodeResponse { Ok(crate::v1_15::api::core::v1::NodeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -849,6 +882,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -876,12 +910,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeResponse { Ok(crate::v1_15::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -929,6 +965,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node_status( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -956,12 +993,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeStatusResponse { Ok(crate::v1_15::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1007,6 +1046,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node( name: &str, optional: ReadNodeOptional<'_>, @@ -1041,6 +1081,7 @@ impl Node { } /// Optional parameters of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -1052,12 +1093,14 @@ pub struct ReadNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeResponse { Ok(crate::v1_15::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1103,6 +1146,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node_status( name: &str, optional: ReadNodeStatusOptional<'_>, @@ -1129,6 +1173,7 @@ impl Node { } /// Optional parameters of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1136,12 +1181,14 @@ pub struct ReadNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeStatusResponse { Ok(crate::v1_15::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1189,6 +1236,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node( name: &str, body: &crate::v1_15::api::core::v1::Node, @@ -1225,6 +1273,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1236,6 +1285,7 @@ pub struct ReplaceNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeResponse { Ok(crate::v1_15::api::core::v1::Node), @@ -1243,6 +1293,7 @@ pub enum ReplaceNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1298,6 +1349,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node_status( name: &str, body: &crate::v1_15::api::core::v1::Node, @@ -1334,6 +1386,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1345,6 +1398,7 @@ pub struct ReplaceNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeStatusResponse { Ok(crate::v1_15::api::core::v1::Node), @@ -1352,6 +1406,7 @@ pub enum ReplaceNodeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1403,6 +1458,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_node( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1421,12 +1477,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::watch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNodeResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/persistent_volume.rs b/src/v1_15/api/core/v1/persistent_volume.rs index 8fc2e4630c..d3dec28c43 100644 --- a/src/v1_15/api/core/v1/persistent_volume.rs +++ b/src/v1_15/api/core/v1/persistent_volume.rs @@ -29,6 +29,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_persistent_volume( body: &crate::v1_15::api::core::v1::PersistentVolume, optional: CreatePersistentVolumeOptional<'_>, @@ -62,6 +63,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePersistentVolumeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreatePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePersistentVolumeResponse { Ok(crate::v1_15::api::core::v1::PersistentVolume), @@ -81,6 +84,7 @@ pub enum CreatePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl PersistentVolume { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_persistent_volume( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -162,6 +167,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_collection_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPersistentVolumeResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteCollectionPersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -227,6 +234,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_persistent_volume( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -246,6 +254,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePersistentVolumeResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -254,6 +263,7 @@ pub enum DeletePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::list_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeResponse { Ok(crate::v1_15::api::core::v1::PersistentVolumeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeResponse { Ok(crate::v1_15::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume_status( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -496,12 +513,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeStatusResponse { Ok(crate::v1_15::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume( name: &str, optional: ReadPersistentVolumeOptional<'_>, @@ -581,6 +601,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -592,12 +613,14 @@ pub struct ReadPersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeResponse { Ok(crate::v1_15::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -643,6 +666,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume_status( name: &str, optional: ReadPersistentVolumeStatusOptional<'_>, @@ -669,6 +693,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,12 +701,14 @@ pub struct ReadPersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeStatusResponse { Ok(crate::v1_15::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -729,6 +756,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume( name: &str, body: &crate::v1_15::api::core::v1::PersistentVolume, @@ -765,6 +793,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -776,6 +805,7 @@ pub struct ReplacePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeResponse { Ok(crate::v1_15::api::core::v1::PersistentVolume), @@ -783,6 +813,7 @@ pub enum ReplacePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -838,6 +869,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume_status( name: &str, body: &crate::v1_15::api::core::v1::PersistentVolume, @@ -874,6 +906,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -885,6 +918,7 @@ pub struct ReplacePersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeStatusResponse { Ok(crate::v1_15::api::core::v1::PersistentVolume), @@ -892,6 +926,7 @@ pub enum ReplacePersistentVolumeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -943,6 +978,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -961,12 +997,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::watch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/persistent_volume_claim.rs b/src/v1_15/api/core/v1/persistent_volume_claim.rs index 387e1dc5b4..711f2fb807 100644 --- a/src/v1_15/api/core/v1/persistent_volume_claim.rs +++ b/src/v1_15/api/core/v1/persistent_volume_claim.rs @@ -33,6 +33,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_persistent_volume_claim( namespace: &str, body: &crate::v1_15::api::core::v1::PersistentVolumeClaim, @@ -69,6 +70,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_15::api::core::v1::PersistentVolumeClaim), @@ -88,6 +91,7 @@ pub enum CreateNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl PersistentVolumeClaim { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_persistent_volume_claim( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_collection_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -363,12 +374,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_15::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume_claim_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_15::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_15::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_15::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_15::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_15::api::core::v1::PersistentVolumeClaim), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_15::api::core::v1::PersistentVolumeClaim), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume_claim_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/pod.rs b/src/v1_15/api/core/v1/pod.rs index 69fd0f7fae..65bb1eff7a 100644 --- a/src/v1_15/api/core/v1/pod.rs +++ b/src/v1_15/api/core/v1/pod.rs @@ -33,6 +33,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -86,6 +88,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -137,6 +141,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_attach( name: &str, namespace: &str, @@ -178,6 +183,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -210,6 +216,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_exec( name: &str, namespace: &str, @@ -255,6 +262,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -289,6 +297,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_portforward( name: &str, namespace: &str, @@ -314,6 +323,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -338,6 +348,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy( name: &str, namespace: &str, @@ -363,6 +374,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -391,6 +403,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -418,6 +431,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -442,6 +456,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy( name: &str, namespace: &str, @@ -467,6 +482,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -495,6 +511,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -522,6 +539,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -546,6 +564,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_attach( name: &str, namespace: &str, @@ -587,6 +606,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -619,6 +639,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_exec( name: &str, namespace: &str, @@ -664,6 +685,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -698,6 +720,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_portforward( name: &str, namespace: &str, @@ -723,6 +746,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -747,6 +771,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy( name: &str, namespace: &str, @@ -772,6 +797,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -800,6 +826,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -827,6 +854,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -851,6 +879,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy( name: &str, namespace: &str, @@ -876,6 +905,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -904,6 +934,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -931,6 +962,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -955,6 +987,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod( namespace: &str, body: &crate::v1_15::api::core::v1::Pod, @@ -991,6 +1024,7 @@ impl Pod { } /// Optional parameters of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1002,6 +1036,7 @@ pub struct CreateNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodResponse { Ok(crate::v1_15::api::core::v1::Pod), @@ -1010,6 +1045,7 @@ pub enum CreateNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1075,6 +1111,7 @@ impl Pod { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -1098,6 +1135,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_collection_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -1105,6 +1143,7 @@ pub enum DeleteCollectionNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1167,6 +1206,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod( name: &str, namespace: &str, @@ -1188,6 +1228,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -1196,6 +1237,7 @@ pub enum DeleteNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1264,6 +1306,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -1285,12 +1328,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodResponse { Ok(crate::v1_15::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1334,6 +1379,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1352,12 +1398,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1409,6 +1457,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod( name: &str, namespace: &str, @@ -1438,12 +1487,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodResponse { Ok(crate::v1_15::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1495,6 +1546,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_status( name: &str, namespace: &str, @@ -1524,12 +1576,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodStatusResponse { Ok(crate::v1_15::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1579,6 +1633,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod( name: &str, namespace: &str, @@ -1615,6 +1670,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -1626,12 +1682,14 @@ pub struct ReadNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodResponse { Ok(crate::v1_15::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1681,6 +1739,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_log( name: &str, namespace: &str, @@ -1737,6 +1796,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodLogOptional<'a> { /// The container for which to stream logs. Defaults to only container if there is one container in the pod. @@ -1758,12 +1818,14 @@ pub struct ReadNamespacedPodLogOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodLogResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodLogResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1823,6 +1885,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_status( name: &str, namespace: &str, @@ -1851,6 +1914,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1858,12 +1922,14 @@ pub struct ReadNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodStatusResponse { Ok(crate::v1_15::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1915,6 +1981,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod( name: &str, namespace: &str, @@ -1953,6 +2020,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1964,6 +2032,7 @@ pub struct ReplaceNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodResponse { Ok(crate::v1_15::api::core::v1::Pod), @@ -1971,6 +2040,7 @@ pub enum ReplaceNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2030,6 +2100,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_status( name: &str, namespace: &str, @@ -2068,6 +2139,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -2079,6 +2151,7 @@ pub struct ReplaceNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodStatusResponse { Ok(crate::v1_15::api::core::v1::Pod), @@ -2086,6 +2159,7 @@ pub enum ReplaceNamespacedPodStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2141,6 +2215,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -2162,12 +2237,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2213,6 +2290,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2231,12 +2309,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/pod_template.rs b/src/v1_15/api/core/v1/pod_template.rs index 10519d73d2..c38ec7cac2 100644 --- a/src/v1_15/api/core/v1/pod_template.rs +++ b/src/v1_15/api/core/v1/pod_template.rs @@ -30,6 +30,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_template( namespace: &str, body: &crate::v1_15::api::core::v1::PodTemplate, @@ -66,6 +67,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodTemplateOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodTemplateResponse { Ok(crate::v1_15::api::core::v1::PodTemplate), @@ -85,6 +88,7 @@ pub enum CreateNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl PodTemplate { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_template( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_collection_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodTemplateResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_template( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodTemplateResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_template( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -360,12 +371,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodTemplateResponse { Ok(crate::v1_15::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_template_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodTemplateForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_template( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::patch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodTemplateResponse { Ok(crate::v1_15::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_template( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodTemplateOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodTemplateResponse { Ok(crate::v1_15::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_template( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodTemplateOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodTemplateResponse { Ok(crate::v1_15::api::core::v1::PodTemplate), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +810,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_template( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -804,12 +832,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodTemplateResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_template_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -873,12 +904,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodTemplateForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/replication_controller.rs b/src/v1_15/api/core/v1/replication_controller.rs index cbc53a2767..79b3798715 100644 --- a/src/v1_15/api/core/v1/replication_controller.rs +++ b/src/v1_15/api/core/v1/replication_controller.rs @@ -33,6 +33,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replication_controller( namespace: &str, body: &crate::v1_15::api::core::v1::ReplicationController, @@ -69,6 +70,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicationControllerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicationControllerResponse { Ok(crate::v1_15::api::core::v1::ReplicationController), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicationController { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replication_controller( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_collection_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicationControllerResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replication_controller( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicationControllerResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replication_controller( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicationControllerResponse { Ok(crate::v1_15::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replication_controller_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicationControllerForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerResponse { Ok(crate::v1_15::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerStatusResponse { Ok(crate::v1_15::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerResponse { Ok(crate::v1_15::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerStatusResponse { Ok(crate::v1_15::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerResponse { Ok(crate::v1_15::api::core::v1::ReplicationController), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerStatusResponse { Ok(crate::v1_15::api::core::v1::ReplicationController), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedReplicationControllerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replication_controller( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicationControllerResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replication_controller_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicationControllerForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/resource_quota.rs b/src/v1_15/api/core/v1/resource_quota.rs index 7b2736598a..81f6cbde7f 100644 --- a/src/v1_15/api/core/v1/resource_quota.rs +++ b/src/v1_15/api/core/v1/resource_quota.rs @@ -33,6 +33,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_resource_quota( namespace: &str, body: &crate::v1_15::api::core::v1::ResourceQuota, @@ -69,6 +70,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedResourceQuotaOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedResourceQuotaResponse { Ok(crate::v1_15::api::core::v1::ResourceQuota), @@ -88,6 +91,7 @@ pub enum CreateNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ResourceQuota { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_resource_quota( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_collection_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedResourceQuotaResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_resource_quota( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedResourceQuotaResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_resource_quota( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedResourceQuotaResponse { Ok(crate::v1_15::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_resource_quota_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListResourceQuotaForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaResponse { Ok(crate::v1_15::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaStatusResponse { Ok(crate::v1_15::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaResponse { Ok(crate::v1_15::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaStatusResponse { Ok(crate::v1_15::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaResponse { Ok(crate::v1_15::api::core::v1::ResourceQuota), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaStatusResponse { Ok(crate::v1_15::api::core::v1::ResourceQuota), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedResourceQuotaStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_resource_quota( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedResourceQuotaResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_resource_quota_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchResourceQuotaForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/secret.rs b/src/v1_15/api/core/v1/secret.rs index a2ba6c1a24..010491533f 100644 --- a/src/v1_15/api/core/v1/secret.rs +++ b/src/v1_15/api/core/v1/secret.rs @@ -36,6 +36,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_secret( namespace: &str, body: &crate::v1_15::api::core::v1::Secret, @@ -72,6 +73,7 @@ impl Secret { } /// Optional parameters of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedSecretOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedSecretResponse { Ok(crate::v1_15::api::core::v1::Secret), @@ -91,6 +94,7 @@ pub enum CreateNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -156,6 +160,7 @@ impl Secret { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_secret( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -179,6 +184,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_collection_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedSecretResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -248,6 +255,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_secret( name: &str, namespace: &str, @@ -269,6 +277,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedSecretResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -277,6 +286,7 @@ pub enum DeleteNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -345,6 +355,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_secret( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -366,12 +377,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedSecretResponse { Ok(crate::v1_15::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -415,6 +428,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_secret_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -433,12 +447,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListSecretForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -490,6 +506,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_secret( name: &str, namespace: &str, @@ -519,12 +536,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::patch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedSecretResponse { Ok(crate::v1_15::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -574,6 +593,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_secret( name: &str, namespace: &str, @@ -610,6 +630,7 @@ impl Secret { } /// Optional parameters of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedSecretOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -621,12 +642,14 @@ pub struct ReadNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedSecretResponse { Ok(crate::v1_15::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -678,6 +701,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_secret( name: &str, namespace: &str, @@ -716,6 +740,7 @@ impl Secret { } /// Optional parameters of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedSecretOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -727,6 +752,7 @@ pub struct ReplaceNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedSecretResponse { Ok(crate::v1_15::api::core::v1::Secret), @@ -734,6 +760,7 @@ pub enum ReplaceNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -789,6 +816,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_secret( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -810,12 +838,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedSecretResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -861,6 +891,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_secret_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -879,12 +910,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchSecretForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/service.rs b/src/v1_15/api/core/v1/service.rs index e50f5b0e11..57f7255657 100644 --- a/src/v1_15/api/core/v1/service.rs +++ b/src/v1_15/api/core/v1/service.rs @@ -33,6 +33,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -86,6 +88,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -137,6 +141,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy( name: &str, namespace: &str, @@ -162,6 +167,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -190,6 +196,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -217,6 +224,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -241,6 +249,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy( name: &str, namespace: &str, @@ -266,6 +275,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -294,6 +304,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -321,6 +332,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -345,6 +357,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy( name: &str, namespace: &str, @@ -370,6 +383,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -398,6 +412,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -425,6 +440,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -449,6 +465,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy( name: &str, namespace: &str, @@ -474,6 +491,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -502,6 +520,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -529,6 +548,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -553,6 +573,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service( namespace: &str, body: &crate::v1_15::api::core::v1::Service, @@ -589,6 +610,7 @@ impl Service { } /// Optional parameters of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct CreateNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceResponse { Ok(crate::v1_15::api::core::v1::Service), @@ -608,6 +631,7 @@ pub enum CreateNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -673,6 +697,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service( name: &str, namespace: &str, @@ -694,6 +719,7 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -702,6 +728,7 @@ pub enum DeleteNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -770,6 +797,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -791,12 +819,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceResponse { Ok(crate::v1_15::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +870,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -858,12 +889,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -915,6 +948,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service( name: &str, namespace: &str, @@ -944,12 +978,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceResponse { Ok(crate::v1_15::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1001,6 +1037,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_status( name: &str, namespace: &str, @@ -1030,12 +1067,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceStatusResponse { Ok(crate::v1_15::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1085,6 +1124,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service( name: &str, namespace: &str, @@ -1121,6 +1161,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -1132,12 +1173,14 @@ pub struct ReadNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceResponse { Ok(crate::v1_15::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1187,6 +1230,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_status( name: &str, namespace: &str, @@ -1215,6 +1259,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1222,12 +1267,14 @@ pub struct ReadNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceStatusResponse { Ok(crate::v1_15::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1279,6 +1326,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service( name: &str, namespace: &str, @@ -1317,6 +1365,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1328,6 +1377,7 @@ pub struct ReplaceNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceResponse { Ok(crate::v1_15::api::core::v1::Service), @@ -1335,6 +1385,7 @@ pub enum ReplaceNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1394,6 +1445,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_status( name: &str, namespace: &str, @@ -1432,6 +1484,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1443,6 +1496,7 @@ pub struct ReplaceNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceStatusResponse { Ok(crate::v1_15::api::core::v1::Service), @@ -1450,6 +1504,7 @@ pub enum ReplaceNamespacedServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1505,6 +1560,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1526,12 +1582,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1577,6 +1635,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1595,12 +1654,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/core/v1/service_account.rs b/src/v1_15/api/core/v1/service_account.rs index 768f34ba85..43e8174b5b 100644 --- a/src/v1_15/api/core/v1/service_account.rs +++ b/src/v1_15/api/core/v1/service_account.rs @@ -36,6 +36,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service_account( namespace: &str, body: &crate::v1_15::api::core::v1::ServiceAccount, @@ -72,6 +73,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceAccountOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceAccountResponse { Ok(crate::v1_15::api::core::v1::ServiceAccount), @@ -91,6 +94,7 @@ pub enum CreateNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -156,6 +160,7 @@ impl ServiceAccount { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_service_account( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -179,6 +184,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_collection_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedServiceAccountResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -248,6 +255,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service_account( name: &str, namespace: &str, @@ -269,6 +277,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceAccountResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -277,6 +286,7 @@ pub enum DeleteNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -345,6 +355,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service_account( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -366,12 +377,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceAccountResponse { Ok(crate::v1_15::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -415,6 +428,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_account_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -433,12 +447,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceAccountForAllNamespacesResponse { Ok(crate::v1_15::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -490,6 +506,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_account( name: &str, namespace: &str, @@ -519,12 +536,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::patch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceAccountResponse { Ok(crate::v1_15::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -574,6 +593,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_account( name: &str, namespace: &str, @@ -610,6 +630,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceAccountOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -621,12 +642,14 @@ pub struct ReadNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceAccountResponse { Ok(crate::v1_15::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -678,6 +701,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_account( name: &str, namespace: &str, @@ -716,6 +740,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceAccountOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -727,6 +752,7 @@ pub struct ReplaceNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceAccountResponse { Ok(crate::v1_15::api::core::v1::ServiceAccount), @@ -734,6 +760,7 @@ pub enum ReplaceNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -789,6 +816,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service_account( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -810,12 +838,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceAccountResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -861,6 +891,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_account_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -879,12 +910,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceAccountForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/events/v1beta1/event.rs b/src/v1_15/api/events/v1beta1/event.rs index 699d680a5a..129b249f3b 100644 --- a/src/v1_15/api/events/v1beta1/event.rs +++ b/src/v1_15/api/events/v1beta1/event.rs @@ -68,6 +68,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_15::api::events::v1beta1::Event, @@ -104,6 +105,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -115,6 +117,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_15::api::events::v1beta1::Event), @@ -123,6 +126,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -188,6 +192,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -211,6 +216,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -218,6 +224,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -280,6 +287,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -301,6 +309,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -309,6 +318,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +383,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +402,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_15::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -444,6 +457,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -465,12 +479,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_15::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -522,6 +538,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -551,12 +568,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_15::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -606,6 +625,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -642,6 +662,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -653,12 +674,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_15::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -710,6 +733,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -748,6 +772,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -759,6 +784,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_15::api::events::v1beta1::Event), @@ -766,6 +792,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -817,6 +844,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -835,12 +863,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -890,6 +920,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -911,12 +942,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/events/v1beta1/mod.rs b/src/v1_15/api/events/v1beta1/mod.rs index 34d0b5bf3a..0029a47de6 100644 --- a/src/v1_15/api/events/v1beta1/mod.rs +++ b/src/v1_15/api/events/v1beta1/mod.rs @@ -1,25 +1,19 @@ mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; diff --git a/src/v1_15/api/extensions/v1beta1/daemon_set.rs b/src/v1_15/api/extensions/v1beta1/daemon_set.rs index 4570302d44..0649f890e8 100644 --- a/src/v1_15/api/extensions/v1beta1/daemon_set.rs +++ b/src/v1_15/api/extensions/v1beta1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_15::api::extensions::v1beta1::DaemonSet, @@ -69,6 +70,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_15::api::extensions::v1beta1::DaemonSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_15::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_15::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_15::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_15::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_15::api::extensions::v1beta1::DaemonSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::DaemonSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/extensions/v1beta1/deployment.rs b/src/v1_15/api/extensions/v1beta1/deployment.rs index c44facaa06..c586b72074 100644 --- a/src/v1_15/api/extensions/v1beta1/deployment.rs +++ b/src/v1_15/api/extensions/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_15::api::extensions::v1beta1::Deployment, @@ -69,6 +70,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_15::api::extensions::v1beta1::Deployment), @@ -88,6 +91,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_15::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_15::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_15::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_15::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_15::api::extensions::v1beta1::Deployment), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::Deployment), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/extensions/v1beta1/deployment_rollback.rs b/src/v1_15/api/extensions/v1beta1/deployment_rollback.rs index 2ff23a8150..0b2abd9208 100644 --- a/src/v1_15/api/extensions/v1beta1/deployment_rollback.rs +++ b/src/v1_15/api/extensions/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -75,6 +76,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -86,6 +88,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -94,6 +97,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/extensions/v1beta1/ingress.rs b/src/v1_15/api/extensions/v1beta1/ingress.rs index ac6fb53d92..f97aad188b 100644 --- a/src/v1_15/api/extensions/v1beta1/ingress.rs +++ b/src/v1_15/api/extensions/v1beta1/ingress.rs @@ -33,6 +33,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_ingress( namespace: &str, body: &crate::v1_15::api::extensions::v1beta1::Ingress, @@ -69,6 +70,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedIngressResponse { Ok(crate::v1_15::api::extensions::v1beta1::Ingress), @@ -88,6 +91,7 @@ pub enum CreateNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Ingress { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_ingress( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_collection_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedIngressResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_ingress( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedIngressResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_ingress_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListIngressForAllNamespacesResponse { Ok(crate::v1_15::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_ingress( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedIngressResponse { Ok(crate::v1_15::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressResponse { Ok(crate::v1_15::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressResponse { Ok(crate::v1_15::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressResponse { Ok(crate::v1_15::api::extensions::v1beta1::Ingress), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::Ingress), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedIngressStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_ingress_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchIngressForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_ingress( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedIngressResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/extensions/v1beta1/mod.rs b/src/v1_15/api/extensions/v1beta1/mod.rs index 0b907807cd..c5752ae875 100644 --- a/src/v1_15/api/extensions/v1beta1/mod.rs +++ b/src/v1_15/api/extensions/v1beta1/mod.rs @@ -1,355 +1,245 @@ mod allowed_csi_driver; -pub use self::allowed_csi_driver::{ - AllowedCSIDriver, -}; +pub use self::allowed_csi_driver::AllowedCSIDriver; mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod http_ingress_path; -pub use self::http_ingress_path::{ - HTTPIngressPath, -}; +pub use self::http_ingress_path::HTTPIngressPath; mod http_ingress_rule_value; -pub use self::http_ingress_rule_value::{ - HTTPIngressRuleValue, -}; +pub use self::http_ingress_rule_value::HTTPIngressRuleValue; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod ingress; -pub use self::ingress::{ - Ingress, - CreateNamespacedIngressOptional, CreateNamespacedIngressResponse, - DeleteCollectionNamespacedIngressResponse, - DeleteNamespacedIngressResponse, - ListIngressForAllNamespacesResponse, - ListNamespacedIngressResponse, - PatchNamespacedIngressResponse, - PatchNamespacedIngressStatusResponse, - ReadNamespacedIngressOptional, ReadNamespacedIngressResponse, - ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse, - ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse, - ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse, - WatchIngressForAllNamespacesResponse, - WatchNamespacedIngressResponse, -}; +pub use self::ingress::Ingress; +#[cfg(feature = "api")] pub use self::ingress::{CreateNamespacedIngressOptional, CreateNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::DeleteCollectionNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::DeleteNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::ListIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::ListNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressStatusResponse; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressOptional, ReadNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::WatchIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::WatchNamespacedIngressResponse; mod ingress_backend; -pub use self::ingress_backend::{ - IngressBackend, -}; +pub use self::ingress_backend::IngressBackend; mod ingress_list; -pub use self::ingress_list::{ - IngressList, -}; +pub use self::ingress_list::IngressList; mod ingress_rule; -pub use self::ingress_rule::{ - IngressRule, -}; +pub use self::ingress_rule::IngressRule; mod ingress_spec; -pub use self::ingress_spec::{ - IngressSpec, -}; +pub use self::ingress_spec::IngressSpec; mod ingress_status; -pub use self::ingress_status::{ - IngressStatus, -}; +pub use self::ingress_status::IngressStatus; mod ingress_tls; -pub use self::ingress_tls::{ - IngressTLS, -}; +pub use self::ingress_tls::IngressTLS; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod run_as_group_strategy_options; -pub use self::run_as_group_strategy_options::{ - RunAsGroupStrategyOptions, -}; +pub use self::run_as_group_strategy_options::RunAsGroupStrategyOptions; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod runtime_class_strategy_options; -pub use self::runtime_class_strategy_options::{ - RuntimeClassStrategyOptions, -}; +pub use self::runtime_class_strategy_options::RuntimeClassStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedReplicationControllerDummyScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerDummyScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_15/api/extensions/v1beta1/network_policy.rs b/src/v1_15/api/extensions/v1beta1/network_policy.rs index 9b1252b464..6cd62cc596 100644 --- a/src/v1_15/api/extensions/v1beta1/network_policy.rs +++ b/src/v1_15/api/extensions/v1beta1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_15::api::extensions::v1beta1::NetworkPolicy, @@ -66,6 +67,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_15::api::extensions::v1beta1::NetworkPolicy), @@ -85,6 +88,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -360,12 +371,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_15::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_15::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_15::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_15::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_15::api::extensions::v1beta1::NetworkPolicy), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +810,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -804,12 +832,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -873,12 +904,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/extensions/v1beta1/pod_security_policy.rs b/src/v1_15/api/extensions/v1beta1/pod_security_policy.rs index 5ecadbff82..1487ddcad5 100644 --- a/src/v1_15/api/extensions/v1beta1/pod_security_policy.rs +++ b/src/v1_15/api/extensions/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_15::api::extensions::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -59,6 +60,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_15::api::extensions::v1beta1::PodSecurityPolicy), @@ -78,6 +81,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -159,6 +164,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_15::api::extensions::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_15::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -498,6 +515,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_15::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_15::api::extensions::v1beta1::PodSecurityPolicy, @@ -598,6 +619,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_15::api::extensions::v1beta1::PodSecurityPolicy), @@ -616,6 +639,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/extensions/v1beta1/replica_set.rs b/src/v1_15/api/extensions/v1beta1/replica_set.rs index 71af4a7f93..1827eebd38 100644 --- a/src/v1_15/api/extensions/v1beta1/replica_set.rs +++ b/src/v1_15/api/extensions/v1beta1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_15::api::extensions::v1beta1::ReplicaSet, @@ -69,6 +70,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_15::api::extensions::v1beta1::ReplicaSet), @@ -88,6 +91,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -363,12 +374,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_15::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_15::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_15::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_15::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_15::api::extensions::v1beta1::ReplicaSet), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_15::api::extensions::v1beta1::ReplicaSet), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1077,6 +1115,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1098,12 +1137,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1149,6 +1190,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1167,12 +1209,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/extensions/v1beta1/scale.rs b/src/v1_15/api/extensions/v1beta1/scale.rs index ccc2c2dbcb..e4c29942e3 100644 --- a/src/v1_15/api/extensions/v1beta1/scale.rs +++ b/src/v1_15/api/extensions/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_15::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_15::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_15::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_15::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -603,6 +625,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -614,6 +637,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_15::api::extensions::v1beta1::Scale), @@ -621,6 +645,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -680,6 +705,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -718,6 +744,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -729,6 +756,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_15::api::extensions::v1beta1::Scale), @@ -736,6 +764,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -795,6 +824,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -833,6 +863,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -844,6 +875,7 @@ pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_15::api::extensions::v1beta1::Scale), @@ -851,6 +883,7 @@ pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/networking/v1/mod.rs b/src/v1_15/api/networking/v1/mod.rs index fcd95f99a8..23233ec53d 100644 --- a/src/v1_15/api/networking/v1/mod.rs +++ b/src/v1_15/api/networking/v1/mod.rs @@ -1,50 +1,34 @@ mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; diff --git a/src/v1_15/api/networking/v1/network_policy.rs b/src/v1_15/api/networking/v1/network_policy.rs index cfa1d22cb6..1bf501552e 100644 --- a/src/v1_15/api/networking/v1/network_policy.rs +++ b/src/v1_15/api/networking/v1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_15::api::networking::v1::NetworkPolicy, @@ -66,6 +67,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_15::api::networking::v1::NetworkPolicy), @@ -85,6 +88,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -360,12 +371,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_15::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_15::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_15::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -604,6 +624,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -615,12 +636,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_15::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +695,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -710,6 +734,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -721,6 +746,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_15::api::networking::v1::NetworkPolicy), @@ -728,6 +754,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +810,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -804,12 +832,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -855,6 +885,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -873,12 +904,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/networking/v1beta1/ingress.rs b/src/v1_15/api/networking/v1beta1/ingress.rs index 49061c5a06..9f25514d14 100644 --- a/src/v1_15/api/networking/v1beta1/ingress.rs +++ b/src/v1_15/api/networking/v1beta1/ingress.rs @@ -33,6 +33,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_ingress( namespace: &str, body: &crate::v1_15::api::networking::v1beta1::Ingress, @@ -69,6 +70,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedIngressResponse { Ok(crate::v1_15::api::networking::v1beta1::Ingress), @@ -88,6 +91,7 @@ pub enum CreateNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl Ingress { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_ingress( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_collection_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedIngressResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_ingress( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedIngressResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -338,6 +348,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_ingress_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -356,12 +367,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListIngressForAllNamespacesResponse { Ok(crate::v1_15::api::networking::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_ingress( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -430,12 +444,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedIngressResponse { Ok(crate::v1_15::api::networking::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressResponse { Ok(crate::v1_15::api::networking::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -573,6 +592,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress_status( name: &str, namespace: &str, @@ -602,12 +622,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressStatusResponse { Ok(crate::v1_15::api::networking::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +679,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress( name: &str, namespace: &str, @@ -693,6 +716,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -704,12 +728,14 @@ pub struct ReadNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressResponse { Ok(crate::v1_15::api::networking::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -759,6 +785,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress_status( name: &str, namespace: &str, @@ -787,6 +814,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -794,12 +822,14 @@ pub struct ReadNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressStatusResponse { Ok(crate::v1_15::api::networking::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -851,6 +881,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress( name: &str, namespace: &str, @@ -889,6 +920,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -900,6 +932,7 @@ pub struct ReplaceNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressResponse { Ok(crate::v1_15::api::networking::v1beta1::Ingress), @@ -907,6 +940,7 @@ pub enum ReplaceNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -966,6 +1000,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress_status( name: &str, namespace: &str, @@ -1004,6 +1039,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1015,6 +1051,7 @@ pub struct ReplaceNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressStatusResponse { Ok(crate::v1_15::api::networking::v1beta1::Ingress), @@ -1022,6 +1059,7 @@ pub enum ReplaceNamespacedIngressStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1073,6 +1111,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_ingress_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1091,12 +1130,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchIngressForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1146,6 +1187,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_ingress( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1167,12 +1209,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedIngressResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/networking/v1beta1/mod.rs b/src/v1_15/api/networking/v1beta1/mod.rs index a8480f74ed..85a9f2f6cf 100644 --- a/src/v1_15/api/networking/v1beta1/mod.rs +++ b/src/v1_15/api/networking/v1beta1/mod.rs @@ -1,58 +1,40 @@ mod http_ingress_path; -pub use self::http_ingress_path::{ - HTTPIngressPath, -}; +pub use self::http_ingress_path::HTTPIngressPath; mod http_ingress_rule_value; -pub use self::http_ingress_rule_value::{ - HTTPIngressRuleValue, -}; +pub use self::http_ingress_rule_value::HTTPIngressRuleValue; mod ingress; -pub use self::ingress::{ - Ingress, - CreateNamespacedIngressOptional, CreateNamespacedIngressResponse, - DeleteCollectionNamespacedIngressResponse, - DeleteNamespacedIngressResponse, - ListIngressForAllNamespacesResponse, - ListNamespacedIngressResponse, - PatchNamespacedIngressResponse, - PatchNamespacedIngressStatusResponse, - ReadNamespacedIngressOptional, ReadNamespacedIngressResponse, - ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse, - ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse, - ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse, - WatchIngressForAllNamespacesResponse, - WatchNamespacedIngressResponse, -}; +pub use self::ingress::Ingress; +#[cfg(feature = "api")] pub use self::ingress::{CreateNamespacedIngressOptional, CreateNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::DeleteCollectionNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::DeleteNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::ListIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::ListNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressStatusResponse; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressOptional, ReadNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::WatchIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::WatchNamespacedIngressResponse; mod ingress_backend; -pub use self::ingress_backend::{ - IngressBackend, -}; +pub use self::ingress_backend::IngressBackend; mod ingress_list; -pub use self::ingress_list::{ - IngressList, -}; +pub use self::ingress_list::IngressList; mod ingress_rule; -pub use self::ingress_rule::{ - IngressRule, -}; +pub use self::ingress_rule::IngressRule; mod ingress_spec; -pub use self::ingress_spec::{ - IngressSpec, -}; +pub use self::ingress_spec::IngressSpec; mod ingress_status; -pub use self::ingress_status::{ - IngressStatus, -}; +pub use self::ingress_status::IngressStatus; mod ingress_tls; -pub use self::ingress_tls::{ - IngressTLS, -}; +pub use self::ingress_tls::IngressTLS; diff --git a/src/v1_15/api/node/v1alpha1/mod.rs b/src/v1_15/api/node/v1alpha1/mod.rs index a2d1830949..ecdaf49f9c 100644 --- a/src/v1_15/api/node/v1alpha1/mod.rs +++ b/src/v1_15/api/node/v1alpha1/mod.rs @@ -1,23 +1,17 @@ mod runtime_class; -pub use self::runtime_class::{ - RuntimeClass, - CreateRuntimeClassOptional, CreateRuntimeClassResponse, - DeleteCollectionRuntimeClassResponse, - DeleteRuntimeClassResponse, - ListRuntimeClassResponse, - PatchRuntimeClassResponse, - ReadRuntimeClassOptional, ReadRuntimeClassResponse, - ReplaceRuntimeClassOptional, ReplaceRuntimeClassResponse, - WatchRuntimeClassResponse, -}; +pub use self::runtime_class::RuntimeClass; +#[cfg(feature = "api")] pub use self::runtime_class::{CreateRuntimeClassOptional, CreateRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::DeleteCollectionRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::DeleteRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::ListRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::PatchRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::{ReadRuntimeClassOptional, ReadRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::{ReplaceRuntimeClassOptional, ReplaceRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::WatchRuntimeClassResponse; mod runtime_class_list; -pub use self::runtime_class_list::{ - RuntimeClassList, -}; +pub use self::runtime_class_list::RuntimeClassList; mod runtime_class_spec; -pub use self::runtime_class_spec::{ - RuntimeClassSpec, -}; +pub use self::runtime_class_spec::RuntimeClassSpec; diff --git a/src/v1_15/api/node/v1alpha1/runtime_class.rs b/src/v1_15/api/node/v1alpha1/runtime_class.rs index 8e73f6113e..acf273d19d 100644 --- a/src/v1_15/api/node/v1alpha1/runtime_class.rs +++ b/src/v1_15/api/node/v1alpha1/runtime_class.rs @@ -26,6 +26,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_runtime_class( body: &crate::v1_15::api::node::v1alpha1::RuntimeClass, optional: CreateRuntimeClassOptional<'_>, @@ -59,6 +60,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::create_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateRuntimeClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::create_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateRuntimeClassResponse { Ok(crate::v1_15::api::node::v1alpha1::RuntimeClass), @@ -78,6 +81,7 @@ pub enum CreateRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl RuntimeClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_runtime_class( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -159,6 +164,7 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::delete_collection_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionRuntimeClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_runtime_class( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::delete_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteRuntimeClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_runtime_class( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::list_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRuntimeClassResponse { Ok(crate::v1_15::api::node::v1alpha1::RuntimeClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_runtime_class( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::patch_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchRuntimeClassResponse { Ok(crate::v1_15::api::node::v1alpha1::RuntimeClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_runtime_class( name: &str, optional: ReadRuntimeClassOptional<'_>, @@ -498,6 +515,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::read_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadRuntimeClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::read_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadRuntimeClassResponse { Ok(crate::v1_15::api::node::v1alpha1::RuntimeClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_runtime_class( name: &str, body: &crate::v1_15::api::node::v1alpha1::RuntimeClass, @@ -598,6 +619,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::replace_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceRuntimeClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::replace_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceRuntimeClassResponse { Ok(crate::v1_15::api::node::v1alpha1::RuntimeClass), @@ -616,6 +639,7 @@ pub enum ReplaceRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_runtime_class( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::watch_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRuntimeClassResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/node/v1beta1/mod.rs b/src/v1_15/api/node/v1beta1/mod.rs index 198e49cbe3..82fb9e3331 100644 --- a/src/v1_15/api/node/v1beta1/mod.rs +++ b/src/v1_15/api/node/v1beta1/mod.rs @@ -1,18 +1,14 @@ mod runtime_class; -pub use self::runtime_class::{ - RuntimeClass, - CreateRuntimeClassOptional, CreateRuntimeClassResponse, - DeleteCollectionRuntimeClassResponse, - DeleteRuntimeClassResponse, - ListRuntimeClassResponse, - PatchRuntimeClassResponse, - ReadRuntimeClassOptional, ReadRuntimeClassResponse, - ReplaceRuntimeClassOptional, ReplaceRuntimeClassResponse, - WatchRuntimeClassResponse, -}; +pub use self::runtime_class::RuntimeClass; +#[cfg(feature = "api")] pub use self::runtime_class::{CreateRuntimeClassOptional, CreateRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::DeleteCollectionRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::DeleteRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::ListRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::PatchRuntimeClassResponse; +#[cfg(feature = "api")] pub use self::runtime_class::{ReadRuntimeClassOptional, ReadRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::{ReplaceRuntimeClassOptional, ReplaceRuntimeClassResponse}; +#[cfg(feature = "api")] pub use self::runtime_class::WatchRuntimeClassResponse; mod runtime_class_list; -pub use self::runtime_class_list::{ - RuntimeClassList, -}; +pub use self::runtime_class_list::RuntimeClassList; diff --git a/src/v1_15/api/node/v1beta1/runtime_class.rs b/src/v1_15/api/node/v1beta1/runtime_class.rs index c2e0b98154..240a1d911f 100644 --- a/src/v1_15/api/node/v1beta1/runtime_class.rs +++ b/src/v1_15/api/node/v1beta1/runtime_class.rs @@ -26,6 +26,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_runtime_class( body: &crate::v1_15::api::node::v1beta1::RuntimeClass, optional: CreateRuntimeClassOptional<'_>, @@ -59,6 +60,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::create_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateRuntimeClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::create_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateRuntimeClassResponse { Ok(crate::v1_15::api::node::v1beta1::RuntimeClass), @@ -78,6 +81,7 @@ pub enum CreateRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl RuntimeClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_runtime_class( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -159,6 +164,7 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::delete_collection_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionRuntimeClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_runtime_class( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::delete_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteRuntimeClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_runtime_class( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::list_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRuntimeClassResponse { Ok(crate::v1_15::api::node::v1beta1::RuntimeClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_runtime_class( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::patch_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchRuntimeClassResponse { Ok(crate::v1_15::api::node::v1beta1::RuntimeClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_runtime_class( name: &str, optional: ReadRuntimeClassOptional<'_>, @@ -498,6 +515,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::read_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadRuntimeClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::read_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadRuntimeClassResponse { Ok(crate::v1_15::api::node::v1beta1::RuntimeClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_runtime_class( name: &str, body: &crate::v1_15::api::node::v1beta1::RuntimeClass, @@ -598,6 +619,7 @@ impl RuntimeClass { } /// Optional parameters of [`RuntimeClass::replace_runtime_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceRuntimeClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceRuntimeClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::replace_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceRuntimeClassResponse { Ok(crate::v1_15::api::node::v1beta1::RuntimeClass), @@ -616,6 +639,7 @@ pub enum ReplaceRuntimeClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl RuntimeClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_runtime_class( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl RuntimeClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`RuntimeClass::watch_runtime_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRuntimeClassResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRuntimeClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/policy/v1beta1/eviction.rs b/src/v1_15/api/policy/v1beta1/eviction.rs index 24ceb3a9d5..9c1739989f 100644 --- a/src/v1_15/api/policy/v1beta1/eviction.rs +++ b/src/v1_15/api/policy/v1beta1/eviction.rs @@ -34,6 +34,7 @@ impl Eviction { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_eviction( name: &str, namespace: &str, @@ -72,6 +73,7 @@ impl Eviction { } /// Optional parameters of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodEvictionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -83,6 +85,7 @@ pub struct CreateNamespacedPodEvictionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodEvictionResponse { Ok(crate::v1_15::api::policy::v1beta1::Eviction), @@ -91,6 +94,7 @@ pub enum CreateNamespacedPodEvictionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodEvictionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/policy/v1beta1/mod.rs b/src/v1_15/api/policy/v1beta1/mod.rs index e2f649fc69..6ad160e924 100644 --- a/src/v1_15/api/policy/v1beta1/mod.rs +++ b/src/v1_15/api/policy/v1beta1/mod.rs @@ -1,117 +1,79 @@ mod allowed_csi_driver; -pub use self::allowed_csi_driver::{ - AllowedCSIDriver, -}; +pub use self::allowed_csi_driver::AllowedCSIDriver; mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod eviction; -pub use self::eviction::{ - Eviction, - CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse, -}; +pub use self::eviction::Eviction; +#[cfg(feature = "api")] pub use self::eviction::{CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse}; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod pod_disruption_budget; -pub use self::pod_disruption_budget::{ - PodDisruptionBudget, - CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse, - DeleteCollectionNamespacedPodDisruptionBudgetResponse, - DeleteNamespacedPodDisruptionBudgetResponse, - ListNamespacedPodDisruptionBudgetResponse, - ListPodDisruptionBudgetForAllNamespacesResponse, - PatchNamespacedPodDisruptionBudgetResponse, - PatchNamespacedPodDisruptionBudgetStatusResponse, - ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse, - ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse, - ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse, - ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse, - WatchNamespacedPodDisruptionBudgetResponse, - WatchPodDisruptionBudgetForAllNamespacesResponse, -}; +pub use self::pod_disruption_budget::PodDisruptionBudget; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteCollectionNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListPodDisruptionBudgetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetStatusResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchPodDisruptionBudgetForAllNamespacesResponse; mod pod_disruption_budget_list; -pub use self::pod_disruption_budget_list::{ - PodDisruptionBudgetList, -}; +pub use self::pod_disruption_budget_list::PodDisruptionBudgetList; mod pod_disruption_budget_spec; -pub use self::pod_disruption_budget_spec::{ - PodDisruptionBudgetSpec, -}; +pub use self::pod_disruption_budget_spec::PodDisruptionBudgetSpec; mod pod_disruption_budget_status; -pub use self::pod_disruption_budget_status::{ - PodDisruptionBudgetStatus, -}; +pub use self::pod_disruption_budget_status::PodDisruptionBudgetStatus; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod run_as_group_strategy_options; -pub use self::run_as_group_strategy_options::{ - RunAsGroupStrategyOptions, -}; +pub use self::run_as_group_strategy_options::RunAsGroupStrategyOptions; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod runtime_class_strategy_options; -pub use self::runtime_class_strategy_options::{ - RuntimeClassStrategyOptions, -}; +pub use self::runtime_class_strategy_options::RuntimeClassStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_15/api/policy/v1beta1/pod_disruption_budget.rs b/src/v1_15/api/policy/v1beta1/pod_disruption_budget.rs index e2c4170cd6..15cd480e8b 100644 --- a/src/v1_15/api/policy/v1beta1/pod_disruption_budget.rs +++ b/src/v1_15/api/policy/v1beta1/pod_disruption_budget.rs @@ -32,6 +32,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_disruption_budget( namespace: &str, body: &crate::v1_15::api::policy::v1beta1::PodDisruptionBudget, @@ -68,6 +69,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_15::api::policy::v1beta1::PodDisruptionBudget), @@ -87,6 +90,7 @@ pub enum CreateNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -152,6 +156,7 @@ impl PodDisruptionBudget { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_disruption_budget( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -175,6 +180,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_collection_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -182,6 +188,7 @@ pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -265,6 +273,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -273,6 +282,7 @@ pub enum DeleteNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -341,6 +351,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -362,12 +373,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_15::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -411,6 +424,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_disruption_budget_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -429,12 +443,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_15::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -486,6 +502,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -515,12 +532,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_15::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -572,6 +591,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -601,12 +621,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_15::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -656,6 +678,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -692,6 +715,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -703,12 +727,14 @@ pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_15::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -758,6 +784,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -786,6 +813,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -793,12 +821,14 @@ pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_15::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -850,6 +880,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -888,6 +919,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -899,6 +931,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_15::api::policy::v1beta1::PodDisruptionBudget), @@ -906,6 +939,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -965,6 +999,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -1003,6 +1038,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -1014,6 +1050,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_15::api::policy::v1beta1::PodDisruptionBudget), @@ -1021,6 +1058,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1076,6 +1114,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -1097,12 +1136,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1148,6 +1189,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_disruption_budget_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1166,12 +1208,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/policy/v1beta1/pod_security_policy.rs b/src/v1_15/api/policy/v1beta1/pod_security_policy.rs index acf9d5a1f1..e5dd037c11 100644 --- a/src/v1_15/api/policy/v1beta1/pod_security_policy.rs +++ b/src/v1_15/api/policy/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_15::api::policy::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -59,6 +60,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_15::api::policy::v1beta1::PodSecurityPolicy), @@ -78,6 +81,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -159,6 +164,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -224,6 +231,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -243,6 +251,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_15::api::policy::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_15::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -498,6 +515,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_15::api::policy::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_15::api::policy::v1beta1::PodSecurityPolicy, @@ -598,6 +619,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_15::api::policy::v1beta1::PodSecurityPolicy), @@ -616,6 +639,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1/cluster_role.rs b/src/v1_15/api/rbac/v1/cluster_role.rs index fd8ec4b5a7..d89ccf2393 100644 --- a/src/v1_15/api/rbac/v1/cluster_role.rs +++ b/src/v1_15/api/rbac/v1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_15::api::rbac::v1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_15::api::rbac::v1::ClusterRole, @@ -589,6 +610,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1::ClusterRole), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1/cluster_role_binding.rs b/src/v1_15/api/rbac/v1/cluster_role_binding.rs index 11ed3b52b3..ad0cfa8d89 100644 --- a/src/v1_15/api/rbac/v1/cluster_role_binding.rs +++ b/src/v1_15/api/rbac/v1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_15::api::rbac::v1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_15::api::rbac::v1::ClusterRoleBinding, @@ -589,6 +610,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1::ClusterRoleBinding), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1/mod.rs b/src/v1_15/api/rbac/v1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_15/api/rbac/v1/mod.rs +++ b/src/v1_15/api/rbac/v1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_15/api/rbac/v1/role.rs b/src/v1_15/api/rbac/v1/role.rs index a74a0865d5..dd17952b55 100644 --- a/src/v1_15/api/rbac/v1/role.rs +++ b/src/v1_15/api/rbac/v1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_15::api::rbac::v1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_15::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -698,6 +722,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -709,6 +734,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1::Role), @@ -716,6 +742,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +798,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -792,12 +820,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -843,6 +873,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -861,12 +892,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1/role_binding.rs b/src/v1_15/api/rbac/v1/role_binding.rs index 8d21efcfc1..b849b4f75b 100644 --- a/src/v1_15/api/rbac/v1/role_binding.rs +++ b/src/v1_15/api/rbac/v1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_15::api::rbac::v1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_15::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -701,6 +725,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -712,6 +737,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1::RoleBinding), @@ -719,6 +745,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +801,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -795,12 +823,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -846,6 +876,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -864,12 +895,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1alpha1/cluster_role.rs b/src/v1_15/api/rbac/v1alpha1/cluster_role.rs index 1214a23410..75c4fbe9b0 100644 --- a/src/v1_15/api/rbac/v1alpha1/cluster_role.rs +++ b/src/v1_15/api/rbac/v1alpha1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_15::api::rbac::v1alpha1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1alpha1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1alpha1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_15::api::rbac::v1alpha1::ClusterRole, @@ -589,6 +610,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1alpha1::ClusterRole), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1alpha1/cluster_role_binding.rs b/src/v1_15/api/rbac/v1alpha1/cluster_role_binding.rs index dced5b4c60..a171de9caa 100644 --- a/src/v1_15/api/rbac/v1alpha1/cluster_role_binding.rs +++ b/src/v1_15/api/rbac/v1alpha1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_15::api::rbac::v1alpha1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1alpha1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1alpha1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_15::api::rbac::v1alpha1::ClusterRoleBinding, @@ -589,6 +610,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1alpha1::ClusterRoleBinding), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1alpha1/mod.rs b/src/v1_15/api/rbac/v1alpha1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_15/api/rbac/v1alpha1/mod.rs +++ b/src/v1_15/api/rbac/v1alpha1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_15/api/rbac/v1alpha1/role.rs b/src/v1_15/api/rbac/v1alpha1/role.rs index a108556548..bf7653b320 100644 --- a/src/v1_15/api/rbac/v1alpha1/role.rs +++ b/src/v1_15/api/rbac/v1alpha1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_15::api::rbac::v1alpha1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1alpha1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_15::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -698,6 +722,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -709,6 +734,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1alpha1::Role), @@ -716,6 +742,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +798,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -792,12 +820,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -843,6 +873,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -861,12 +892,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1alpha1/role_binding.rs b/src/v1_15/api/rbac/v1alpha1/role_binding.rs index 126e95352d..8217d16e2c 100644 --- a/src/v1_15/api/rbac/v1alpha1/role_binding.rs +++ b/src/v1_15/api/rbac/v1alpha1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_15::api::rbac::v1alpha1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1alpha1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_15::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -701,6 +725,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -712,6 +737,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1alpha1::RoleBinding), @@ -719,6 +745,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +801,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -795,12 +823,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -846,6 +876,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -864,12 +895,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1beta1/cluster_role.rs b/src/v1_15/api/rbac/v1beta1/cluster_role.rs index eaef2684f0..65e9a6d97e 100644 --- a/src/v1_15/api/rbac/v1beta1/cluster_role.rs +++ b/src/v1_15/api/rbac/v1beta1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_15::api::rbac::v1beta1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1beta1::ClusterRole), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1beta1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_15::api::rbac::v1beta1::ClusterRole, @@ -589,6 +610,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_15::api::rbac::v1beta1::ClusterRole), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1beta1/cluster_role_binding.rs b/src/v1_15/api/rbac/v1beta1/cluster_role_binding.rs index b384873945..75fb39348b 100644 --- a/src/v1_15/api/rbac/v1beta1/cluster_role_binding.rs +++ b/src/v1_15/api/rbac/v1beta1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_15::api::rbac::v1beta1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -62,6 +63,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -73,6 +75,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1beta1::ClusterRoleBinding), @@ -81,6 +84,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -142,6 +146,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -169,6 +175,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -255,6 +263,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -262,6 +271,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -336,12 +347,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1beta1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +402,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -416,12 +430,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -467,6 +483,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -493,6 +510,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -500,12 +518,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +573,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_15::api::rbac::v1beta1::ClusterRoleBinding, @@ -589,6 +610,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -600,6 +622,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1beta1::ClusterRoleBinding), @@ -607,6 +630,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -658,6 +682,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -676,12 +701,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1beta1/mod.rs b/src/v1_15/api/rbac/v1beta1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_15/api/rbac/v1beta1/mod.rs +++ b/src/v1_15/api/rbac/v1beta1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_15/api/rbac/v1beta1/role.rs b/src/v1_15/api/rbac/v1beta1/role.rs index 8c6dd8baf0..1fb6ba0a21 100644 --- a/src/v1_15/api/rbac/v1beta1/role.rs +++ b/src/v1_15/api/rbac/v1beta1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_15::api::rbac::v1beta1::Role, @@ -66,6 +67,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -77,6 +79,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1beta1::Role), @@ -85,6 +88,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -150,6 +154,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -173,6 +178,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -180,6 +186,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -242,6 +249,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -263,6 +271,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -339,6 +349,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -360,12 +371,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -409,6 +422,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -427,12 +441,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_15::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -513,12 +530,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -568,6 +587,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -596,6 +616,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -603,12 +624,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -660,6 +683,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -698,6 +722,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -709,6 +734,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_15::api::rbac::v1beta1::Role), @@ -716,6 +742,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +798,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -792,12 +820,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -843,6 +873,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -861,12 +892,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/rbac/v1beta1/role_binding.rs b/src/v1_15/api/rbac/v1beta1/role_binding.rs index be339fd33b..ca679b0b2e 100644 --- a/src/v1_15/api/rbac/v1beta1/role_binding.rs +++ b/src/v1_15/api/rbac/v1beta1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_15::api::rbac::v1beta1::RoleBinding, @@ -69,6 +70,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -80,6 +82,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1beta1::RoleBinding), @@ -88,6 +91,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -153,6 +157,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -176,6 +181,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -183,6 +189,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -245,6 +252,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -266,6 +274,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -274,6 +283,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -342,6 +352,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -363,12 +374,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -412,6 +425,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -430,12 +444,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_15::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -487,6 +503,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -516,12 +533,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +590,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -599,6 +619,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -606,12 +627,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -663,6 +686,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -701,6 +725,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -712,6 +737,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_15::api::rbac::v1beta1::RoleBinding), @@ -719,6 +745,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +801,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -795,12 +823,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -846,6 +876,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -864,12 +895,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/scheduling/v1/mod.rs b/src/v1_15/api/scheduling/v1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_15/api/scheduling/v1/mod.rs +++ b/src/v1_15/api/scheduling/v1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_15/api/scheduling/v1/priority_class.rs b/src/v1_15/api/scheduling/v1/priority_class.rs index fc0e6a0c3c..e60b8f1f17 100644 --- a/src/v1_15/api/scheduling/v1/priority_class.rs +++ b/src/v1_15/api/scheduling/v1/priority_class.rs @@ -35,6 +35,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_15::api::scheduling::v1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -68,6 +69,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1::PriorityClass), @@ -87,6 +90,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -148,6 +152,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -168,6 +173,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -175,6 +181,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -252,6 +260,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -260,6 +269,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -324,6 +334,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -342,12 +353,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -395,6 +408,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -422,12 +436,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +489,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -507,6 +524,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -518,12 +536,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +591,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_15::api::scheduling::v1::PriorityClass, @@ -607,6 +628,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -618,6 +640,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1::PriorityClass), @@ -625,6 +648,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -676,6 +700,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -694,12 +719,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/scheduling/v1alpha1/mod.rs b/src/v1_15/api/scheduling/v1alpha1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_15/api/scheduling/v1alpha1/mod.rs +++ b/src/v1_15/api/scheduling/v1alpha1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_15/api/scheduling/v1alpha1/priority_class.rs b/src/v1_15/api/scheduling/v1alpha1/priority_class.rs index 3a39aa47e0..85275a46bd 100644 --- a/src/v1_15/api/scheduling/v1alpha1/priority_class.rs +++ b/src/v1_15/api/scheduling/v1alpha1/priority_class.rs @@ -35,6 +35,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_15::api::scheduling::v1alpha1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -68,6 +69,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1alpha1::PriorityClass), @@ -87,6 +90,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -148,6 +152,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -168,6 +173,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -175,6 +181,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -252,6 +260,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -260,6 +269,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -324,6 +334,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -342,12 +353,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1alpha1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -395,6 +408,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -422,12 +436,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +489,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -507,6 +524,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -518,12 +536,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +591,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_15::api::scheduling::v1alpha1::PriorityClass, @@ -607,6 +628,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -618,6 +640,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1alpha1::PriorityClass), @@ -625,6 +648,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -676,6 +700,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -694,12 +719,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/scheduling/v1beta1/mod.rs b/src/v1_15/api/scheduling/v1beta1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_15/api/scheduling/v1beta1/mod.rs +++ b/src/v1_15/api/scheduling/v1beta1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_15/api/scheduling/v1beta1/priority_class.rs b/src/v1_15/api/scheduling/v1beta1/priority_class.rs index bf53a8da07..ed029de62a 100644 --- a/src/v1_15/api/scheduling/v1beta1/priority_class.rs +++ b/src/v1_15/api/scheduling/v1beta1/priority_class.rs @@ -35,6 +35,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_15::api::scheduling::v1beta1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -68,6 +69,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -79,6 +81,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1beta1::PriorityClass), @@ -87,6 +90,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -148,6 +152,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -168,6 +173,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -175,6 +181,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -252,6 +260,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -260,6 +269,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -324,6 +334,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -342,12 +353,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1beta1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -395,6 +408,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -422,12 +436,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1beta1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +489,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -507,6 +524,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -518,12 +536,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1beta1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -571,6 +591,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_15::api::scheduling::v1beta1::PriorityClass, @@ -607,6 +628,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -618,6 +640,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_15::api::scheduling::v1beta1::PriorityClass), @@ -625,6 +648,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -676,6 +700,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -694,12 +719,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/settings/v1alpha1/mod.rs b/src/v1_15/api/settings/v1alpha1/mod.rs index f0ebd9df12..7816e600a8 100644 --- a/src/v1_15/api/settings/v1alpha1/mod.rs +++ b/src/v1_15/api/settings/v1alpha1/mod.rs @@ -1,25 +1,19 @@ mod pod_preset; -pub use self::pod_preset::{ - PodPreset, - CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse, - DeleteCollectionNamespacedPodPresetResponse, - DeleteNamespacedPodPresetResponse, - ListNamespacedPodPresetResponse, - ListPodPresetForAllNamespacesResponse, - PatchNamespacedPodPresetResponse, - ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse, - ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse, - WatchNamespacedPodPresetResponse, - WatchPodPresetForAllNamespacesResponse, -}; +pub use self::pod_preset::PodPreset; +#[cfg(feature = "api")] pub use self::pod_preset::{CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteCollectionNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListPodPresetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_preset::PatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::{ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::{ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::WatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::WatchPodPresetForAllNamespacesResponse; mod pod_preset_list; -pub use self::pod_preset_list::{ - PodPresetList, -}; +pub use self::pod_preset_list::PodPresetList; mod pod_preset_spec; -pub use self::pod_preset_spec::{ - PodPresetSpec, -}; +pub use self::pod_preset_spec::PodPresetSpec; diff --git a/src/v1_15/api/settings/v1alpha1/pod_preset.rs b/src/v1_15/api/settings/v1alpha1/pod_preset.rs index c79d79bbde..44c44b39d1 100644 --- a/src/v1_15/api/settings/v1alpha1/pod_preset.rs +++ b/src/v1_15/api/settings/v1alpha1/pod_preset.rs @@ -28,6 +28,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_preset( namespace: &str, body: &crate::v1_15::api::settings::v1alpha1::PodPreset, @@ -64,6 +65,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodPresetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodPresetResponse { Ok(crate::v1_15::api::settings::v1alpha1::PodPreset), @@ -83,6 +86,7 @@ pub enum CreateNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -148,6 +152,7 @@ impl PodPreset { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_preset( namespace: &str, delete_optional: crate::v1_15::DeleteOptional<'_>, @@ -171,6 +176,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_collection_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodPresetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -178,6 +184,7 @@ pub enum DeleteCollectionNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -240,6 +247,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_preset( name: &str, namespace: &str, @@ -261,6 +269,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodPresetResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -269,6 +278,7 @@ pub enum DeleteNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -337,6 +347,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_preset( namespace: &str, optional: crate::v1_15::ListOptional<'_>, @@ -358,12 +369,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodPresetResponse { Ok(crate::v1_15::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -407,6 +420,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_preset_for_all_namespaces( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -425,12 +439,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodPresetForAllNamespacesResponse { Ok(crate::v1_15::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -482,6 +498,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_preset( name: &str, namespace: &str, @@ -511,12 +528,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::patch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodPresetResponse { Ok(crate::v1_15::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -566,6 +585,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_preset( name: &str, namespace: &str, @@ -602,6 +622,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodPresetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -613,12 +634,14 @@ pub struct ReadNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodPresetResponse { Ok(crate::v1_15::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -670,6 +693,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_preset( name: &str, namespace: &str, @@ -708,6 +732,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodPresetOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -719,6 +744,7 @@ pub struct ReplaceNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodPresetResponse { Ok(crate::v1_15::api::settings::v1alpha1::PodPreset), @@ -726,6 +752,7 @@ pub enum ReplaceNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -781,6 +808,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_preset( namespace: &str, optional: crate::v1_15::WatchOptional<'_>, @@ -802,12 +830,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodPresetResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -853,6 +883,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_preset_for_all_namespaces( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -871,12 +902,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodPresetForAllNamespacesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/storage/v1/mod.rs b/src/v1_15/api/storage/v1/mod.rs index 57aca76186..09616e1c54 100644 --- a/src/v1_15/api/storage/v1/mod.rs +++ b/src/v1_15/api/storage/v1/mod.rs @@ -1,59 +1,43 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - PatchVolumeAttachmentStatusResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReadVolumeAttachmentStatusOptional, ReadVolumeAttachmentStatusResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - ReplaceVolumeAttachmentStatusOptional, ReplaceVolumeAttachmentStatusResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentStatusResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentStatusOptional, ReadVolumeAttachmentStatusResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentStatusOptional, ReplaceVolumeAttachmentStatusResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_15/api/storage/v1/storage_class.rs b/src/v1_15/api/storage/v1/storage_class.rs index 79b85a4ac6..81aa82094b 100644 --- a/src/v1_15/api/storage/v1/storage_class.rs +++ b/src/v1_15/api/storage/v1/storage_class.rs @@ -46,6 +46,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_15::api::storage::v1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -79,6 +80,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -90,6 +92,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_15::api::storage::v1::StorageClass), @@ -98,6 +101,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -159,6 +163,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -179,6 +184,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -263,6 +271,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_15::api::storage::v1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -433,12 +447,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_15::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -518,6 +535,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -529,12 +547,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_15::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -582,6 +602,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_15::api::storage::v1::StorageClass, @@ -618,6 +639,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -629,6 +651,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_15::api::storage::v1::StorageClass), @@ -636,6 +659,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -687,6 +711,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -705,12 +730,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/storage/v1/volume_attachment.rs b/src/v1_15/api/storage/v1/volume_attachment.rs index c454756f21..9d5562c3d3 100644 --- a/src/v1_15/api/storage/v1/volume_attachment.rs +++ b/src/v1_15/api/storage/v1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_15::api::storage::v1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -64,6 +65,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1::VolumeAttachment), @@ -83,6 +86,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -164,6 +169,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -338,12 +349,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -418,12 +432,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -471,6 +487,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment_status( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -498,12 +515,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentStatusResponse { Ok(crate::v1_15::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -549,6 +568,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -583,6 +603,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -594,12 +615,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -645,6 +668,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment_status( name: &str, optional: ReadVolumeAttachmentStatusOptional<'_>, @@ -671,6 +695,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -678,12 +703,14 @@ pub struct ReadVolumeAttachmentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentStatusResponse { Ok(crate::v1_15::api::storage::v1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -731,6 +758,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_15::api::storage::v1::VolumeAttachment, @@ -767,6 +795,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -778,6 +807,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1::VolumeAttachment), @@ -785,6 +815,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -840,6 +871,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment_status( name: &str, body: &crate::v1_15::api::storage::v1::VolumeAttachment, @@ -876,6 +908,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -887,6 +920,7 @@ pub struct ReplaceVolumeAttachmentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentStatusResponse { Ok(crate::v1_15::api::storage::v1::VolumeAttachment), @@ -894,6 +928,7 @@ pub enum ReplaceVolumeAttachmentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -945,6 +980,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -963,12 +999,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/storage/v1alpha1/mod.rs b/src/v1_15/api/storage/v1alpha1/mod.rs index a5eefeed6c..4b5a7d41ec 100644 --- a/src/v1_15/api/storage/v1alpha1/mod.rs +++ b/src/v1_15/api/storage/v1alpha1/mod.rs @@ -1,38 +1,26 @@ mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_15/api/storage/v1alpha1/volume_attachment.rs b/src/v1_15/api/storage/v1alpha1/volume_attachment.rs index 9815a294f3..6810129ea5 100644 --- a/src/v1_15/api/storage/v1alpha1/volume_attachment.rs +++ b/src/v1_15/api/storage/v1alpha1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_15::api::storage::v1alpha1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -64,6 +65,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1alpha1::VolumeAttachment), @@ -83,6 +86,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -164,6 +169,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -338,12 +349,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1alpha1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -418,12 +432,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -503,6 +520,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -514,12 +532,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -567,6 +587,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_15::api::storage::v1alpha1::VolumeAttachment, @@ -603,6 +624,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -614,6 +636,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1alpha1::VolumeAttachment), @@ -621,6 +644,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +696,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -690,12 +715,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/storage/v1beta1/csi_driver.rs b/src/v1_15/api/storage/v1beta1/csi_driver.rs index 8a2de6bdb0..8dc23972c9 100644 --- a/src/v1_15/api/storage/v1beta1/csi_driver.rs +++ b/src/v1_15/api/storage/v1beta1/csi_driver.rs @@ -26,6 +26,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_csi_driver( body: &crate::v1_15::api::storage::v1beta1::CSIDriver, optional: CreateCSIDriverOptional<'_>, @@ -59,6 +60,7 @@ impl CSIDriver { } /// Optional parameters of [`CSIDriver::create_csi_driver`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCSIDriverOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateCSIDriverOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::create_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCSIDriverResponse { Ok(crate::v1_15::api::storage::v1beta1::CSIDriver), @@ -78,6 +81,7 @@ pub enum CreateCSIDriverResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_csi_driver( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -158,6 +163,7 @@ impl CSIDriver { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::delete_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCSIDriverResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCSIDriverResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -232,6 +239,7 @@ impl CSIDriver { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_csi_driver( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -252,6 +260,7 @@ impl CSIDriver { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::delete_collection_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCSIDriverResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -259,6 +268,7 @@ pub enum DeleteCollectionCSIDriverResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_csi_driver( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl CSIDriver { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::list_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCSIDriverResponse { Ok(crate::v1_15::api::storage::v1beta1::CSIDriverList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_csi_driver( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl CSIDriver { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::patch_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCSIDriverResponse { Ok(crate::v1_15::api::storage::v1beta1::CSIDriver), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_csi_driver( name: &str, optional: ReadCSIDriverOptional<'_>, @@ -498,6 +515,7 @@ impl CSIDriver { } /// Optional parameters of [`CSIDriver::read_csi_driver`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCSIDriverOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadCSIDriverOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::read_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCSIDriverResponse { Ok(crate::v1_15::api::storage::v1beta1::CSIDriver), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_csi_driver( name: &str, body: &crate::v1_15::api::storage::v1beta1::CSIDriver, @@ -598,6 +619,7 @@ impl CSIDriver { } /// Optional parameters of [`CSIDriver::replace_csi_driver`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCSIDriverOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceCSIDriverOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::replace_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCSIDriverResponse { Ok(crate::v1_15::api::storage::v1beta1::CSIDriver), @@ -616,6 +639,7 @@ pub enum ReplaceCSIDriverResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl CSIDriver { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_csi_driver( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl CSIDriver { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSIDriver::watch_csi_driver`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCSIDriverResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCSIDriverResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/storage/v1beta1/csi_node.rs b/src/v1_15/api/storage/v1beta1/csi_node.rs index 3bf0f817cb..35cb9002dc 100644 --- a/src/v1_15/api/storage/v1beta1/csi_node.rs +++ b/src/v1_15/api/storage/v1beta1/csi_node.rs @@ -26,6 +26,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_csi_node( body: &crate::v1_15::api::storage::v1beta1::CSINode, optional: CreateCSINodeOptional<'_>, @@ -59,6 +60,7 @@ impl CSINode { } /// Optional parameters of [`CSINode::create_csi_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCSINodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -70,6 +72,7 @@ pub struct CreateCSINodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::create_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCSINodeResponse { Ok(crate::v1_15::api::storage::v1beta1::CSINode), @@ -78,6 +81,7 @@ pub enum CreateCSINodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -139,6 +143,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_csi_node( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -158,6 +163,7 @@ impl CSINode { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::delete_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCSINodeResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCSINodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -232,6 +239,7 @@ impl CSINode { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_csi_node( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -252,6 +260,7 @@ impl CSINode { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::delete_collection_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCSINodeResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -259,6 +268,7 @@ pub enum DeleteCollectionCSINodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -315,6 +325,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_csi_node( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -333,12 +344,14 @@ impl CSINode { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::list_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCSINodeResponse { Ok(crate::v1_15::api::storage::v1beta1::CSINodeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_csi_node( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -413,12 +427,14 @@ impl CSINode { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::patch_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCSINodeResponse { Ok(crate::v1_15::api::storage::v1beta1::CSINode), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -464,6 +480,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_csi_node( name: &str, optional: ReadCSINodeOptional<'_>, @@ -498,6 +515,7 @@ impl CSINode { } /// Optional parameters of [`CSINode::read_csi_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCSINodeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -509,12 +527,14 @@ pub struct ReadCSINodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::read_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCSINodeResponse { Ok(crate::v1_15::api::storage::v1beta1::CSINode), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +582,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_csi_node( name: &str, body: &crate::v1_15::api::storage::v1beta1::CSINode, @@ -598,6 +619,7 @@ impl CSINode { } /// Optional parameters of [`CSINode::replace_csi_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCSINodeOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -609,6 +631,7 @@ pub struct ReplaceCSINodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::replace_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCSINodeResponse { Ok(crate::v1_15::api::storage::v1beta1::CSINode), @@ -616,6 +639,7 @@ pub enum ReplaceCSINodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -667,6 +691,7 @@ impl CSINode { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_csi_node( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -685,12 +710,14 @@ impl CSINode { } /// Use `::try_from_parts` to parse the HTTP response body of [`CSINode::watch_csi_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCSINodeResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCSINodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/storage/v1beta1/mod.rs b/src/v1_15/api/storage/v1beta1/mod.rs index 265b8b7dcf..a5d5454671 100644 --- a/src/v1_15/api/storage/v1beta1/mod.rs +++ b/src/v1_15/api/storage/v1beta1/mod.rs @@ -1,107 +1,77 @@ mod csi_driver; -pub use self::csi_driver::{ - CSIDriver, - CreateCSIDriverOptional, CreateCSIDriverResponse, - DeleteCSIDriverResponse, - DeleteCollectionCSIDriverResponse, - ListCSIDriverResponse, - PatchCSIDriverResponse, - ReadCSIDriverOptional, ReadCSIDriverResponse, - ReplaceCSIDriverOptional, ReplaceCSIDriverResponse, - WatchCSIDriverResponse, -}; +pub use self::csi_driver::CSIDriver; +#[cfg(feature = "api")] pub use self::csi_driver::{CreateCSIDriverOptional, CreateCSIDriverResponse}; +#[cfg(feature = "api")] pub use self::csi_driver::DeleteCSIDriverResponse; +#[cfg(feature = "api")] pub use self::csi_driver::DeleteCollectionCSIDriverResponse; +#[cfg(feature = "api")] pub use self::csi_driver::ListCSIDriverResponse; +#[cfg(feature = "api")] pub use self::csi_driver::PatchCSIDriverResponse; +#[cfg(feature = "api")] pub use self::csi_driver::{ReadCSIDriverOptional, ReadCSIDriverResponse}; +#[cfg(feature = "api")] pub use self::csi_driver::{ReplaceCSIDriverOptional, ReplaceCSIDriverResponse}; +#[cfg(feature = "api")] pub use self::csi_driver::WatchCSIDriverResponse; mod csi_driver_list; -pub use self::csi_driver_list::{ - CSIDriverList, -}; +pub use self::csi_driver_list::CSIDriverList; mod csi_driver_spec; -pub use self::csi_driver_spec::{ - CSIDriverSpec, -}; +pub use self::csi_driver_spec::CSIDriverSpec; mod csi_node; -pub use self::csi_node::{ - CSINode, - CreateCSINodeOptional, CreateCSINodeResponse, - DeleteCSINodeResponse, - DeleteCollectionCSINodeResponse, - ListCSINodeResponse, - PatchCSINodeResponse, - ReadCSINodeOptional, ReadCSINodeResponse, - ReplaceCSINodeOptional, ReplaceCSINodeResponse, - WatchCSINodeResponse, -}; +pub use self::csi_node::CSINode; +#[cfg(feature = "api")] pub use self::csi_node::{CreateCSINodeOptional, CreateCSINodeResponse}; +#[cfg(feature = "api")] pub use self::csi_node::DeleteCSINodeResponse; +#[cfg(feature = "api")] pub use self::csi_node::DeleteCollectionCSINodeResponse; +#[cfg(feature = "api")] pub use self::csi_node::ListCSINodeResponse; +#[cfg(feature = "api")] pub use self::csi_node::PatchCSINodeResponse; +#[cfg(feature = "api")] pub use self::csi_node::{ReadCSINodeOptional, ReadCSINodeResponse}; +#[cfg(feature = "api")] pub use self::csi_node::{ReplaceCSINodeOptional, ReplaceCSINodeResponse}; +#[cfg(feature = "api")] pub use self::csi_node::WatchCSINodeResponse; mod csi_node_driver; -pub use self::csi_node_driver::{ - CSINodeDriver, -}; +pub use self::csi_node_driver::CSINodeDriver; mod csi_node_list; -pub use self::csi_node_list::{ - CSINodeList, -}; +pub use self::csi_node_list::CSINodeList; mod csi_node_spec; -pub use self::csi_node_spec::{ - CSINodeSpec, -}; +pub use self::csi_node_spec::CSINodeSpec; mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_15/api/storage/v1beta1/storage_class.rs b/src/v1_15/api/storage/v1beta1/storage_class.rs index 7e63ee2e38..ed096c7022 100644 --- a/src/v1_15/api/storage/v1beta1/storage_class.rs +++ b/src/v1_15/api/storage/v1beta1/storage_class.rs @@ -46,6 +46,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_15::api::storage::v1beta1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -79,6 +80,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -90,6 +92,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_15::api::storage::v1beta1::StorageClass), @@ -98,6 +101,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -159,6 +163,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -179,6 +184,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -186,6 +192,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +251,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -263,6 +271,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -271,6 +280,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -335,6 +345,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -353,12 +364,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_15::api::storage::v1beta1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -406,6 +419,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -433,12 +447,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_15::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -484,6 +500,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -518,6 +535,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -529,12 +547,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_15::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -582,6 +602,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_15::api::storage::v1beta1::StorageClass, @@ -618,6 +639,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -629,6 +651,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_15::api::storage::v1beta1::StorageClass), @@ -636,6 +659,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -687,6 +711,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -705,12 +730,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/api/storage/v1beta1/volume_attachment.rs b/src/v1_15/api/storage/v1beta1/volume_attachment.rs index cd1871f1af..6906ffe7e5 100644 --- a/src/v1_15/api/storage/v1beta1/volume_attachment.rs +++ b/src/v1_15/api/storage/v1beta1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_15::api::storage::v1beta1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -64,6 +65,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -75,6 +77,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1beta1::VolumeAttachment), @@ -83,6 +86,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -164,6 +169,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -338,12 +349,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1beta1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -418,12 +432,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -503,6 +520,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -514,12 +532,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1beta1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -567,6 +587,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_15::api::storage::v1beta1::VolumeAttachment, @@ -603,6 +624,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -614,6 +636,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_15::api::storage::v1beta1::VolumeAttachment), @@ -621,6 +644,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -672,6 +696,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -690,12 +715,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs b/src/v1_15/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs index 21f820f0a2..6ccace8c93 100644 --- a/src/v1_15/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs +++ b/src/v1_15/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs @@ -28,6 +28,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_custom_resource_definition( body: &crate::v1_15::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, optional: CreateCustomResourceDefinitionOptional<'_>, @@ -61,6 +62,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCustomResourceDefinitionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCustomResourceDefinitionResponse { Ok(crate::v1_15::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -80,6 +83,7 @@ pub enum CreateCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CustomResourceDefinition { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_custom_resource_definition( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -161,6 +166,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_collection_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCustomResourceDefinitionResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -226,6 +233,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_custom_resource_definition( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -245,6 +253,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCustomResourceDefinitionResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -253,6 +262,7 @@ pub enum DeleteCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_custom_resource_definition( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::list_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCustomResourceDefinitionResponse { Ok(crate::v1_15::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinitionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionResponse { Ok(crate::v1_15::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition_status( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionStatusResponse { Ok(crate::v1_15::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition( name: &str, optional: ReadCustomResourceDefinitionOptional<'_>, @@ -580,6 +600,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -591,12 +612,14 @@ pub struct ReadCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionResponse { Ok(crate::v1_15::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition_status( name: &str, optional: ReadCustomResourceDefinitionStatusOptional<'_>, @@ -668,6 +692,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionStatusResponse { Ok(crate::v1_15::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition( name: &str, body: &crate::v1_15::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -764,6 +792,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -775,6 +804,7 @@ pub struct ReplaceCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionResponse { Ok(crate::v1_15::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -782,6 +812,7 @@ pub enum ReplaceCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +868,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition_status( name: &str, body: &crate::v1_15::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -873,6 +905,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -884,6 +917,7 @@ pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionStatusResponse { Ok(crate::v1_15::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -891,6 +925,7 @@ pub enum ReplaceCustomResourceDefinitionStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -942,6 +977,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_custom_resource_definition( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -960,12 +996,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::watch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCustomResourceDefinitionResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs b/src/v1_15/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs index df135d45fe..3c0069e78d 100644 --- a/src/v1_15/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs +++ b/src/v1_15/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs @@ -1,116 +1,74 @@ mod custom_resource_column_definition; -pub use self::custom_resource_column_definition::{ - CustomResourceColumnDefinition, -}; +pub use self::custom_resource_column_definition::CustomResourceColumnDefinition; mod custom_resource_conversion; -pub use self::custom_resource_conversion::{ - CustomResourceConversion, -}; +pub use self::custom_resource_conversion::CustomResourceConversion; mod custom_resource_definition; -pub use self::custom_resource_definition::{ - CustomResourceDefinition, - CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse, - DeleteCollectionCustomResourceDefinitionResponse, - DeleteCustomResourceDefinitionResponse, - ListCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionStatusResponse, - ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse, - ReadCustomResourceDefinitionStatusOptional, ReadCustomResourceDefinitionStatusResponse, - ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse, - ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse, - WatchCustomResourceDefinitionResponse, -}; +pub use self::custom_resource_definition::CustomResourceDefinition; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCollectionCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::ListCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionStatusResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionStatusOptional, ReadCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::WatchCustomResourceDefinitionResponse; mod custom_resource_definition_condition; -pub use self::custom_resource_definition_condition::{ - CustomResourceDefinitionCondition, -}; +pub use self::custom_resource_definition_condition::CustomResourceDefinitionCondition; mod custom_resource_definition_list; -pub use self::custom_resource_definition_list::{ - CustomResourceDefinitionList, -}; +pub use self::custom_resource_definition_list::CustomResourceDefinitionList; mod custom_resource_definition_names; -pub use self::custom_resource_definition_names::{ - CustomResourceDefinitionNames, -}; +pub use self::custom_resource_definition_names::CustomResourceDefinitionNames; mod custom_resource_definition_spec; -pub use self::custom_resource_definition_spec::{ - CustomResourceDefinitionSpec, -}; +pub use self::custom_resource_definition_spec::CustomResourceDefinitionSpec; mod custom_resource_definition_status; -pub use self::custom_resource_definition_status::{ - CustomResourceDefinitionStatus, -}; +pub use self::custom_resource_definition_status::CustomResourceDefinitionStatus; mod custom_resource_definition_version; -pub use self::custom_resource_definition_version::{ - CustomResourceDefinitionVersion, -}; +pub use self::custom_resource_definition_version::CustomResourceDefinitionVersion; mod custom_resource_subresource_scale; -pub use self::custom_resource_subresource_scale::{ - CustomResourceSubresourceScale, -}; +pub use self::custom_resource_subresource_scale::CustomResourceSubresourceScale; mod custom_resource_subresource_status; -pub use self::custom_resource_subresource_status::{ - CustomResourceSubresourceStatus, -}; +pub use self::custom_resource_subresource_status::CustomResourceSubresourceStatus; mod custom_resource_subresources; -pub use self::custom_resource_subresources::{ - CustomResourceSubresources, -}; +pub use self::custom_resource_subresources::CustomResourceSubresources; mod custom_resource_validation; -pub use self::custom_resource_validation::{ - CustomResourceValidation, -}; +pub use self::custom_resource_validation::CustomResourceValidation; mod external_documentation; -pub use self::external_documentation::{ - ExternalDocumentation, -}; +pub use self::external_documentation::ExternalDocumentation; mod json; -pub use self::json::{ - JSON, -}; +pub use self::json::JSON; mod json_schema_props; -pub use self::json_schema_props::{ - JSONSchemaProps, -}; +pub use self::json_schema_props::JSONSchemaProps; mod json_schema_props_or_array; -pub use self::json_schema_props_or_array::{ - JSONSchemaPropsOrArray, -}; +pub use self::json_schema_props_or_array::JSONSchemaPropsOrArray; mod json_schema_props_or_bool; -pub use self::json_schema_props_or_bool::{ - JSONSchemaPropsOrBool, -}; +pub use self::json_schema_props_or_bool::JSONSchemaPropsOrBool; mod json_schema_props_or_string_array; -pub use self::json_schema_props_or_string_array::{ - JSONSchemaPropsOrStringArray, -}; +pub use self::json_schema_props_or_string_array::JSONSchemaPropsOrStringArray; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; diff --git a/src/v1_15/apimachinery/pkg/api/resource/mod.rs b/src/v1_15/apimachinery/pkg/api/resource/mod.rs index 352925b923..629eeca5bc 100644 --- a/src/v1_15/apimachinery/pkg/api/resource/mod.rs +++ b/src/v1_15/apimachinery/pkg/api/resource/mod.rs @@ -1,5 +1,3 @@ mod quantity; -pub use self::quantity::{ - Quantity, -}; +pub use self::quantity::Quantity; diff --git a/src/v1_15/apimachinery/pkg/apis/meta/v1/mod.rs b/src/v1_15/apimachinery/pkg/apis/meta/v1/mod.rs index 553358492b..50fc82f97c 100644 --- a/src/v1_15/apimachinery/pkg/apis/meta/v1/mod.rs +++ b/src/v1_15/apimachinery/pkg/apis/meta/v1/mod.rs @@ -1,125 +1,75 @@ mod api_group; -pub use self::api_group::{ - APIGroup, -}; +pub use self::api_group::APIGroup; mod api_group_list; -pub use self::api_group_list::{ - APIGroupList, -}; +pub use self::api_group_list::APIGroupList; mod api_resource; -pub use self::api_resource::{ - APIResource, -}; +pub use self::api_resource::APIResource; mod api_resource_list; -pub use self::api_resource_list::{ - APIResourceList, -}; +pub use self::api_resource_list::APIResourceList; mod api_versions; -pub use self::api_versions::{ - APIVersions, -}; +pub use self::api_versions::APIVersions; mod delete_options; -pub use self::delete_options::{ - DeleteOptions, -}; +pub use self::delete_options::DeleteOptions; mod fields; -pub use self::fields::{ - Fields, -}; +pub use self::fields::Fields; mod group_version_for_discovery; -pub use self::group_version_for_discovery::{ - GroupVersionForDiscovery, -}; +pub use self::group_version_for_discovery::GroupVersionForDiscovery; mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializers; -pub use self::initializers::{ - Initializers, -}; +pub use self::initializers::Initializers; mod label_selector; -pub use self::label_selector::{ - LabelSelector, -}; +pub use self::label_selector::LabelSelector; mod label_selector_requirement; -pub use self::label_selector_requirement::{ - LabelSelectorRequirement, -}; +pub use self::label_selector_requirement::LabelSelectorRequirement; mod list_meta; -pub use self::list_meta::{ - ListMeta, -}; +pub use self::list_meta::ListMeta; mod managed_fields_entry; -pub use self::managed_fields_entry::{ - ManagedFieldsEntry, -}; +pub use self::managed_fields_entry::ManagedFieldsEntry; mod micro_time; -pub use self::micro_time::{ - MicroTime, -}; +pub use self::micro_time::MicroTime; mod object_meta; -pub use self::object_meta::{ - ObjectMeta, -}; +pub use self::object_meta::ObjectMeta; mod owner_reference; -pub use self::owner_reference::{ - OwnerReference, -}; +pub use self::owner_reference::OwnerReference; mod patch; -pub use self::patch::{ - Patch, -}; +pub use self::patch::Patch; mod preconditions; -pub use self::preconditions::{ - Preconditions, -}; +pub use self::preconditions::Preconditions; mod server_address_by_client_cidr; -pub use self::server_address_by_client_cidr::{ - ServerAddressByClientCIDR, -}; +pub use self::server_address_by_client_cidr::ServerAddressByClientCIDR; mod status; -pub use self::status::{ - Status, -}; +pub use self::status::Status; mod status_cause; -pub use self::status_cause::{ - StatusCause, -}; +pub use self::status_cause::StatusCause; mod status_details; -pub use self::status_details::{ - StatusDetails, -}; +pub use self::status_details::StatusDetails; mod time; -pub use self::time::{ - Time, -}; +pub use self::time::Time; mod watch_event; -pub use self::watch_event::{ - WatchEvent, -}; +pub use self::watch_event::WatchEvent; diff --git a/src/v1_15/apimachinery/pkg/runtime/mod.rs b/src/v1_15/apimachinery/pkg/runtime/mod.rs index 8614e1a158..eb2b8c0503 100644 --- a/src/v1_15/apimachinery/pkg/runtime/mod.rs +++ b/src/v1_15/apimachinery/pkg/runtime/mod.rs @@ -1,5 +1,3 @@ mod raw_extension; -pub use self::raw_extension::{ - RawExtension, -}; +pub use self::raw_extension::RawExtension; diff --git a/src/v1_15/apimachinery/pkg/util/intstr/mod.rs b/src/v1_15/apimachinery/pkg/util/intstr/mod.rs index 0d14f602e5..d3f7196121 100644 --- a/src/v1_15/apimachinery/pkg/util/intstr/mod.rs +++ b/src/v1_15/apimachinery/pkg/util/intstr/mod.rs @@ -1,5 +1,3 @@ mod int_or_string; -pub use self::int_or_string::{ - IntOrString, -}; +pub use self::int_or_string::IntOrString; diff --git a/src/v1_15/apimachinery/pkg/version/mod.rs b/src/v1_15/apimachinery/pkg/version/mod.rs index 540fa68d40..f125e577d1 100644 --- a/src/v1_15/apimachinery/pkg/version/mod.rs +++ b/src/v1_15/apimachinery/pkg/version/mod.rs @@ -1,5 +1,3 @@ mod info; -pub use self::info::{ - Info, -}; +pub use self::info::Info; diff --git a/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs b/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs index 8f3f2261fa..f8ab17a9eb 100644 --- a/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs +++ b/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -61,6 +62,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -80,6 +83,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -254,6 +262,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service_status( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceStatusResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -580,6 +600,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -591,12 +612,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service_status( name: &str, optional: ReadAPIServiceStatusOptional<'_>, @@ -668,6 +692,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceStatusResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -764,6 +792,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -775,6 +804,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -782,6 +812,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +868,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1::APIService, @@ -873,6 +905,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -884,6 +917,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1::APIService), @@ -891,6 +925,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -942,6 +977,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -960,12 +996,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs b/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs index f3c577aa5e..d210366939 100644 --- a/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs +++ b/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1/mod.rs @@ -1,41 +1,29 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - PatchAPIServiceStatusResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceStatusResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs b/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs index d481ba5c7b..ab8aafe544 100644 --- a/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs +++ b/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -61,6 +62,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -72,6 +74,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -80,6 +83,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_15::DeleteOptional<'_>, @@ -160,6 +165,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -234,6 +241,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_15::DeleteOptional<'_>, list_optional: crate::v1_15::ListOptional<'_>, @@ -254,6 +262,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_15::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_15::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -415,12 +429,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service_status( name: &str, body: &crate::v1_15::apimachinery::pkg::apis::meta::v1::Patch, @@ -495,12 +512,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceStatusResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +565,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -580,6 +600,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. @@ -591,12 +612,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service_status( name: &str, optional: ReadAPIServiceStatusOptional<'_>, @@ -668,6 +692,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,12 +700,14 @@ pub struct ReadAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceStatusResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -728,6 +755,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -764,6 +792,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -775,6 +804,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -782,6 +812,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -837,6 +868,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -873,6 +905,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed @@ -884,6 +917,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_15::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -891,6 +925,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -942,6 +977,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_15::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -960,12 +996,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs b/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs index f3c577aa5e..d210366939 100644 --- a/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs +++ b/src/v1_15/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs @@ -1,41 +1,29 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - PatchAPIServiceStatusResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceStatusResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceStatusOptional, ReadAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_15/mod.rs b/src/v1_15/mod.rs index 4069921af1..99b4809eaf 100644 --- a/src/v1_15/mod.rs +++ b/src/v1_15/mod.rs @@ -1,23 +1,15 @@ mod delete_optional; -pub use self::delete_optional::{ - DeleteOptional, -}; +pub use self::delete_optional::DeleteOptional; mod list_optional; -pub use self::list_optional::{ - ListOptional, -}; +pub use self::list_optional::ListOptional; mod patch_optional; -pub use self::patch_optional::{ - PatchOptional, -}; +pub use self::patch_optional::PatchOptional; mod watch_optional; -pub use self::watch_optional::{ - WatchOptional, -}; +pub use self::watch_optional::WatchOptional; pub mod api; @@ -32,6 +24,7 @@ pub mod kube_aggregator; /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAPIVersionsResponse`]`>` constructor, or [`GetAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/".to_owned(); @@ -45,12 +38,14 @@ pub fn get_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAPIVersionsResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroupList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -85,6 +80,7 @@ impl crate::Response for GetAPIVersionsResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationAPIGroupResponse`]`>` constructor, or [`GetAdmissionregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/".to_owned(); @@ -98,12 +94,14 @@ pub fn get_admissionregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +136,7 @@ impl crate::Response for GetAdmissionregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1beta1/".to_owned(); @@ -151,12 +150,14 @@ pub fn get_admissionregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -191,6 +192,7 @@ impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsAPIGroupResponse`]`>` constructor, or [`GetApiextensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/".to_owned(); @@ -204,12 +206,14 @@ pub fn get_apiextensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +248,7 @@ impl crate::Response for GetApiextensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiextensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/v1beta1/".to_owned(); @@ -257,12 +262,14 @@ pub fn get_apiextensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +304,7 @@ impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationAPIGroupResponse`]`>` constructor, or [`GetApiregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/".to_owned(); @@ -310,12 +318,14 @@ pub fn get_apiregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +360,7 @@ impl crate::Response for GetApiregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1/".to_owned(); @@ -363,12 +374,14 @@ pub fn get_apiregistration_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -403,6 +416,7 @@ impl crate::Response for GetApiregistrationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1beta1/".to_owned(); @@ -416,12 +430,14 @@ pub fn get_apiregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -456,6 +472,7 @@ impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsAPIGroupResponse`]`>` constructor, or [`GetAppsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/".to_owned(); @@ -469,12 +486,14 @@ pub fn get_apps_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -509,6 +528,7 @@ impl crate::Response for GetAppsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1APIResourcesResponse`]`>` constructor, or [`GetAppsV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1/".to_owned(); @@ -522,12 +542,14 @@ pub fn get_apps_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +584,7 @@ impl crate::Response for GetAppsV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta1APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta1/".to_owned(); @@ -575,12 +598,14 @@ pub fn get_apps_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -615,6 +640,7 @@ impl crate::Response for GetAppsV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta2APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta2/".to_owned(); @@ -628,12 +654,14 @@ pub fn get_apps_v1beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta2APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +696,7 @@ impl crate::Response for GetAppsV1beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuditregistrationAPIGroupResponse`]`>` constructor, or [`GetAuditregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_auditregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/auditregistration.k8s.io/".to_owned(); @@ -681,12 +710,14 @@ pub fn get_auditregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_auditregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuditregistrationAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuditregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -721,6 +752,7 @@ impl crate::Response for GetAuditregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuditregistrationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetAuditregistrationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_auditregistration_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/auditregistration.k8s.io/v1alpha1/".to_owned(); @@ -734,12 +766,14 @@ pub fn get_auditregistration_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_auditregistration_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuditregistrationV1alpha1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuditregistrationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +808,7 @@ impl crate::Response for GetAuditregistrationV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationAPIGroupResponse`]`>` constructor, or [`GetAuthenticationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/".to_owned(); @@ -787,12 +822,14 @@ pub fn get_authentication_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -827,6 +864,7 @@ impl crate::Response for GetAuthenticationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1/".to_owned(); @@ -840,12 +878,14 @@ pub fn get_authentication_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -880,6 +920,7 @@ impl crate::Response for GetAuthenticationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1beta1/".to_owned(); @@ -893,12 +934,14 @@ pub fn get_authentication_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +976,7 @@ impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationAPIGroupResponse`]`>` constructor, or [`GetAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/".to_owned(); @@ -946,12 +990,14 @@ pub fn get_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -986,6 +1032,7 @@ impl crate::Response for GetAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1/".to_owned(); @@ -999,12 +1046,14 @@ pub fn get_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1039,6 +1088,7 @@ impl crate::Response for GetAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1beta1/".to_owned(); @@ -1052,12 +1102,14 @@ pub fn get_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1092,6 +1144,7 @@ impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingAPIGroupResponse`]`>` constructor, or [`GetAutoscalingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/".to_owned(); @@ -1105,12 +1158,14 @@ pub fn get_autoscaling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1145,6 +1200,7 @@ impl crate::Response for GetAutoscalingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v1/".to_owned(); @@ -1158,12 +1214,14 @@ pub fn get_autoscaling_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1198,6 +1256,7 @@ impl crate::Response for GetAutoscalingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta1/".to_owned(); @@ -1211,12 +1270,14 @@ pub fn get_autoscaling_v2beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1251,6 +1312,7 @@ impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta2APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta2/".to_owned(); @@ -1264,12 +1326,14 @@ pub fn get_autoscaling_v2beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta2APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1304,6 +1368,7 @@ impl crate::Response for GetAutoscalingV2beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchAPIGroupResponse`]`>` constructor, or [`GetBatchAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/".to_owned(); @@ -1317,12 +1382,14 @@ pub fn get_batch_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1357,6 +1424,7 @@ impl crate::Response for GetBatchAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1APIResourcesResponse`]`>` constructor, or [`GetBatchV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1/".to_owned(); @@ -1370,12 +1438,14 @@ pub fn get_batch_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1410,6 +1480,7 @@ impl crate::Response for GetBatchV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1beta1APIResourcesResponse`]`>` constructor, or [`GetBatchV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1beta1/".to_owned(); @@ -1423,12 +1494,14 @@ pub fn get_batch_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1463,6 +1536,7 @@ impl crate::Response for GetBatchV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV2alpha1APIResourcesResponse`]`>` constructor, or [`GetBatchV2alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v2alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v2alpha1/".to_owned(); @@ -1476,12 +1550,14 @@ pub fn get_batch_v2alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v2alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV2alpha1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV2alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1516,6 +1592,7 @@ impl crate::Response for GetBatchV2alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesAPIGroupResponse`]`>` constructor, or [`GetCertificatesAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/".to_owned(); @@ -1529,12 +1606,14 @@ pub fn get_certificates_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1569,6 +1648,7 @@ impl crate::Response for GetCertificatesAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesV1beta1APIResourcesResponse`]`>` constructor, or [`GetCertificatesV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/v1beta1/".to_owned(); @@ -1582,12 +1662,14 @@ pub fn get_certificates_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1622,6 +1704,7 @@ impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { /// get the code version /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCodeVersionResponse`]`>` constructor, or [`GetCodeVersionResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_code_version( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/version/".to_owned(); @@ -1635,12 +1718,14 @@ pub fn get_code_version( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_code_version`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCodeVersionResponse { Ok(crate::v1_15::apimachinery::pkg::version::Info), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCodeVersionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1675,6 +1760,7 @@ impl crate::Response for GetCodeVersionResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoordinationAPIGroupResponse`]`>` constructor, or [`GetCoordinationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_coordination_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/coordination.k8s.io/".to_owned(); @@ -1688,12 +1774,14 @@ pub fn get_coordination_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_coordination_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoordinationAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoordinationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1728,6 +1816,7 @@ impl crate::Response for GetCoordinationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoordinationV1APIResourcesResponse`]`>` constructor, or [`GetCoordinationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_coordination_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/coordination.k8s.io/v1/".to_owned(); @@ -1741,12 +1830,14 @@ pub fn get_coordination_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_coordination_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoordinationV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoordinationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1781,6 +1872,7 @@ impl crate::Response for GetCoordinationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoordinationV1beta1APIResourcesResponse`]`>` constructor, or [`GetCoordinationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_coordination_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/coordination.k8s.io/v1beta1/".to_owned(); @@ -1794,12 +1886,14 @@ pub fn get_coordination_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_coordination_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoordinationV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoordinationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1834,6 +1928,7 @@ impl crate::Response for GetCoordinationV1beta1APIResourcesResponse { /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreAPIVersionsResponse`]`>` constructor, or [`GetCoreAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/".to_owned(); @@ -1847,12 +1942,14 @@ pub fn get_core_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreAPIVersionsResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIVersions), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1887,6 +1984,7 @@ impl crate::Response for GetCoreAPIVersionsResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreV1APIResourcesResponse`]`>` constructor, or [`GetCoreV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/v1/".to_owned(); @@ -1900,12 +1998,14 @@ pub fn get_core_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1940,6 +2040,7 @@ impl crate::Response for GetCoreV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsAPIGroupResponse`]`>` constructor, or [`GetEventsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/".to_owned(); @@ -1953,12 +2054,14 @@ pub fn get_events_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1993,6 +2096,7 @@ impl crate::Response for GetEventsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsV1beta1APIResourcesResponse`]`>` constructor, or [`GetEventsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/v1beta1/".to_owned(); @@ -2006,12 +2110,14 @@ pub fn get_events_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2046,6 +2152,7 @@ impl crate::Response for GetEventsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsAPIGroupResponse`]`>` constructor, or [`GetExtensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/".to_owned(); @@ -2059,12 +2166,14 @@ pub fn get_extensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2099,6 +2208,7 @@ impl crate::Response for GetExtensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetExtensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/v1beta1/".to_owned(); @@ -2112,12 +2222,14 @@ pub fn get_extensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2152,6 +2264,7 @@ impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingAPIGroupResponse`]`>` constructor, or [`GetNetworkingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/".to_owned(); @@ -2165,12 +2278,14 @@ pub fn get_networking_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2205,6 +2320,7 @@ impl crate::Response for GetNetworkingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingV1APIResourcesResponse`]`>` constructor, or [`GetNetworkingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/v1/".to_owned(); @@ -2218,12 +2334,14 @@ pub fn get_networking_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2258,6 +2376,7 @@ impl crate::Response for GetNetworkingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingV1beta1APIResourcesResponse`]`>` constructor, or [`GetNetworkingV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/v1beta1/".to_owned(); @@ -2271,12 +2390,14 @@ pub fn get_networking_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2311,6 +2432,7 @@ impl crate::Response for GetNetworkingV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNodeAPIGroupResponse`]`>` constructor, or [`GetNodeAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_node_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/node.k8s.io/".to_owned(); @@ -2324,12 +2446,14 @@ pub fn get_node_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_node_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNodeAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNodeAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2364,6 +2488,7 @@ impl crate::Response for GetNodeAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNodeV1alpha1APIResourcesResponse`]`>` constructor, or [`GetNodeV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_node_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/node.k8s.io/v1alpha1/".to_owned(); @@ -2377,12 +2502,14 @@ pub fn get_node_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_node_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNodeV1alpha1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNodeV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2417,6 +2544,7 @@ impl crate::Response for GetNodeV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNodeV1beta1APIResourcesResponse`]`>` constructor, or [`GetNodeV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_node_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/node.k8s.io/v1beta1/".to_owned(); @@ -2430,12 +2558,14 @@ pub fn get_node_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_node_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNodeV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNodeV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2470,6 +2600,7 @@ impl crate::Response for GetNodeV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyAPIGroupResponse`]`>` constructor, or [`GetPolicyAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/".to_owned(); @@ -2483,12 +2614,14 @@ pub fn get_policy_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2523,6 +2656,7 @@ impl crate::Response for GetPolicyAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyV1beta1APIResourcesResponse`]`>` constructor, or [`GetPolicyV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/v1beta1/".to_owned(); @@ -2536,12 +2670,14 @@ pub fn get_policy_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2576,6 +2712,7 @@ impl crate::Response for GetPolicyV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationAPIGroupResponse`]`>` constructor, or [`GetRbacAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/".to_owned(); @@ -2589,12 +2726,14 @@ pub fn get_rbac_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2629,6 +2768,7 @@ impl crate::Response for GetRbacAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1/".to_owned(); @@ -2642,12 +2782,14 @@ pub fn get_rbac_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2682,6 +2824,7 @@ impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1alpha1/".to_owned(); @@ -2695,12 +2838,14 @@ pub fn get_rbac_authorization_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1alpha1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2735,6 +2880,7 @@ impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1beta1/".to_owned(); @@ -2748,12 +2894,14 @@ pub fn get_rbac_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2788,6 +2936,7 @@ impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingAPIGroupResponse`]`>` constructor, or [`GetSchedulingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/".to_owned(); @@ -2801,12 +2950,14 @@ pub fn get_scheduling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2841,6 +2992,7 @@ impl crate::Response for GetSchedulingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1/".to_owned(); @@ -2854,12 +3006,14 @@ pub fn get_scheduling_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2894,6 +3048,7 @@ impl crate::Response for GetSchedulingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1alpha1/".to_owned(); @@ -2907,12 +3062,14 @@ pub fn get_scheduling_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1alpha1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2947,6 +3104,7 @@ impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1beta1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1beta1/".to_owned(); @@ -2960,12 +3118,14 @@ pub fn get_scheduling_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3000,6 +3160,7 @@ impl crate::Response for GetSchedulingV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsAPIGroupResponse`]`>` constructor, or [`GetSettingsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/".to_owned(); @@ -3013,12 +3174,14 @@ pub fn get_settings_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3053,6 +3216,7 @@ impl crate::Response for GetSettingsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSettingsV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/v1alpha1/".to_owned(); @@ -3066,12 +3230,14 @@ pub fn get_settings_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsV1alpha1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3106,6 +3272,7 @@ impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageAPIGroupResponse`]`>` constructor, or [`GetStorageAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/".to_owned(); @@ -3119,12 +3286,14 @@ pub fn get_storage_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageAPIGroupResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3159,6 +3328,7 @@ impl crate::Response for GetStorageAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1APIResourcesResponse`]`>` constructor, or [`GetStorageV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1/".to_owned(); @@ -3172,12 +3342,14 @@ pub fn get_storage_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3212,6 +3384,7 @@ impl crate::Response for GetStorageV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1alpha1APIResourcesResponse`]`>` constructor, or [`GetStorageV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1alpha1/".to_owned(); @@ -3225,12 +3398,14 @@ pub fn get_storage_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1alpha1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3265,6 +3440,7 @@ impl crate::Response for GetStorageV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1beta1APIResourcesResponse`]`>` constructor, or [`GetStorageV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1beta1/".to_owned(); @@ -3278,12 +3454,14 @@ pub fn get_storage_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1beta1APIResourcesResponse { Ok(crate::v1_15::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3322,6 +3500,7 @@ impl crate::Response for GetStorageV1beta1APIResourcesResponse { /// * `logpath` /// /// path to the log +#[cfg(feature = "api")] pub fn log_file_handler( logpath: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -3338,11 +3517,13 @@ pub fn log_file_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -3367,6 +3548,7 @@ impl crate::Response for LogFileHandlerResponse { // Generated from operation logFileListHandler /// Use the returned [`crate::ResponseBody`]`<`[`LogFileListHandlerResponse`]`>` constructor, or [`LogFileListHandlerResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn log_file_list_handler( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/logs/".to_owned(); @@ -3380,11 +3562,13 @@ pub fn log_file_list_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_list_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileListHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileListHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/admissionregistration/v1alpha1/external_admission_hook_configuration.rs b/src/v1_8/api/admissionregistration/v1alpha1/external_admission_hook_configuration.rs index d5bf0c2ddf..bb61d08889 100644 --- a/src/v1_8/api/admissionregistration/v1alpha1/external_admission_hook_configuration.rs +++ b/src/v1_8/api/admissionregistration/v1alpha1/external_admission_hook_configuration.rs @@ -26,6 +26,7 @@ impl ExternalAdmissionHookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_external_admission_hook_configuration( body: &crate::v1_8::api::admissionregistration::v1alpha1::ExternalAdmissionHookConfiguration, optional: CreateExternalAdmissionHookConfigurationOptional<'_>, @@ -51,6 +52,7 @@ impl ExternalAdmissionHookConfiguration { } /// Optional parameters of [`ExternalAdmissionHookConfiguration::create_external_admission_hook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateExternalAdmissionHookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,12 +60,14 @@ pub struct CreateExternalAdmissionHookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ExternalAdmissionHookConfiguration::create_external_admission_hook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateExternalAdmissionHookConfigurationResponse { Ok(crate::v1_8::api::admissionregistration::v1alpha1::ExternalAdmissionHookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateExternalAdmissionHookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -109,6 +113,7 @@ impl ExternalAdmissionHookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_external_admission_hook_configuration( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -129,6 +134,7 @@ impl ExternalAdmissionHookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ExternalAdmissionHookConfiguration::delete_collection_external_admission_hook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionExternalAdmissionHookConfigurationResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -136,6 +142,7 @@ pub enum DeleteCollectionExternalAdmissionHookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionExternalAdmissionHookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -194,6 +201,7 @@ impl ExternalAdmissionHookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_external_admission_hook_configuration( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -213,6 +221,7 @@ impl ExternalAdmissionHookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ExternalAdmissionHookConfiguration::delete_external_admission_hook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteExternalAdmissionHookConfigurationResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -220,6 +229,7 @@ pub enum DeleteExternalAdmissionHookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteExternalAdmissionHookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -276,6 +286,7 @@ impl ExternalAdmissionHookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_external_admission_hook_configuration( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -294,12 +305,14 @@ impl ExternalAdmissionHookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ExternalAdmissionHookConfiguration::list_external_admission_hook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListExternalAdmissionHookConfigurationResponse { Ok(crate::v1_8::api::admissionregistration::v1alpha1::ExternalAdmissionHookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListExternalAdmissionHookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -347,6 +360,7 @@ impl ExternalAdmissionHookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_external_admission_hook_configuration( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -374,12 +388,14 @@ impl ExternalAdmissionHookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ExternalAdmissionHookConfiguration::patch_external_admission_hook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchExternalAdmissionHookConfigurationResponse { Ok(crate::v1_8::api::admissionregistration::v1alpha1::ExternalAdmissionHookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchExternalAdmissionHookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -425,6 +441,7 @@ impl ExternalAdmissionHookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_external_admission_hook_configuration( name: &str, optional: ReadExternalAdmissionHookConfigurationOptional<'_>, @@ -459,6 +476,7 @@ impl ExternalAdmissionHookConfiguration { } /// Optional parameters of [`ExternalAdmissionHookConfiguration::read_external_admission_hook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadExternalAdmissionHookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -470,12 +488,14 @@ pub struct ReadExternalAdmissionHookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ExternalAdmissionHookConfiguration::read_external_admission_hook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadExternalAdmissionHookConfigurationResponse { Ok(crate::v1_8::api::admissionregistration::v1alpha1::ExternalAdmissionHookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadExternalAdmissionHookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -523,6 +543,7 @@ impl ExternalAdmissionHookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_external_admission_hook_configuration( name: &str, body: &crate::v1_8::api::admissionregistration::v1alpha1::ExternalAdmissionHookConfiguration, @@ -551,6 +572,7 @@ impl ExternalAdmissionHookConfiguration { } /// Optional parameters of [`ExternalAdmissionHookConfiguration::replace_external_admission_hook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceExternalAdmissionHookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -558,12 +580,14 @@ pub struct ReplaceExternalAdmissionHookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ExternalAdmissionHookConfiguration::replace_external_admission_hook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceExternalAdmissionHookConfigurationResponse { Ok(crate::v1_8::api::admissionregistration::v1alpha1::ExternalAdmissionHookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceExternalAdmissionHookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -607,6 +631,7 @@ impl ExternalAdmissionHookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_external_admission_hook_configuration( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -625,12 +650,14 @@ impl ExternalAdmissionHookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ExternalAdmissionHookConfiguration::watch_external_admission_hook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchExternalAdmissionHookConfigurationResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchExternalAdmissionHookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/admissionregistration/v1alpha1/initializer_configuration.rs b/src/v1_8/api/admissionregistration/v1alpha1/initializer_configuration.rs index 020e196738..9d0bdb2ef4 100644 --- a/src/v1_8/api/admissionregistration/v1alpha1/initializer_configuration.rs +++ b/src/v1_8/api/admissionregistration/v1alpha1/initializer_configuration.rs @@ -26,6 +26,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_initializer_configuration( body: &crate::v1_8::api::admissionregistration::v1alpha1::InitializerConfiguration, optional: CreateInitializerConfigurationOptional<'_>, @@ -51,6 +52,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateInitializerConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,12 +60,14 @@ pub struct CreateInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateInitializerConfigurationResponse { Ok(crate::v1_8::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -109,6 +113,7 @@ impl InitializerConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_initializer_configuration( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -129,6 +134,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_collection_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionInitializerConfigurationResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -136,6 +142,7 @@ pub enum DeleteCollectionInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -194,6 +201,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_initializer_configuration( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -213,6 +221,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteInitializerConfigurationResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -220,6 +229,7 @@ pub enum DeleteInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -276,6 +286,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_initializer_configuration( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -294,12 +305,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::list_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListInitializerConfigurationResponse { Ok(crate::v1_8::api::admissionregistration::v1alpha1::InitializerConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -347,6 +360,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_initializer_configuration( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -374,12 +388,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::patch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchInitializerConfigurationResponse { Ok(crate::v1_8::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -425,6 +441,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_initializer_configuration( name: &str, optional: ReadInitializerConfigurationOptional<'_>, @@ -459,6 +476,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadInitializerConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -470,12 +488,14 @@ pub struct ReadInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadInitializerConfigurationResponse { Ok(crate::v1_8::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -523,6 +543,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_initializer_configuration( name: &str, body: &crate::v1_8::api::admissionregistration::v1alpha1::InitializerConfiguration, @@ -551,6 +572,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceInitializerConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -558,12 +580,14 @@ pub struct ReplaceInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceInitializerConfigurationResponse { Ok(crate::v1_8::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -607,6 +631,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_initializer_configuration( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -625,12 +650,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::watch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchInitializerConfigurationResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/admissionregistration/v1alpha1/mod.rs b/src/v1_8/api/admissionregistration/v1alpha1/mod.rs index 8876423f67..0b75d32e22 100644 --- a/src/v1_8/api/admissionregistration/v1alpha1/mod.rs +++ b/src/v1_8/api/admissionregistration/v1alpha1/mod.rs @@ -1,66 +1,46 @@ mod admission_hook_client_config; -pub use self::admission_hook_client_config::{ - AdmissionHookClientConfig, -}; +pub use self::admission_hook_client_config::AdmissionHookClientConfig; mod external_admission_hook; -pub use self::external_admission_hook::{ - ExternalAdmissionHook, -}; +pub use self::external_admission_hook::ExternalAdmissionHook; mod external_admission_hook_configuration; -pub use self::external_admission_hook_configuration::{ - ExternalAdmissionHookConfiguration, - CreateExternalAdmissionHookConfigurationOptional, CreateExternalAdmissionHookConfigurationResponse, - DeleteCollectionExternalAdmissionHookConfigurationResponse, - DeleteExternalAdmissionHookConfigurationResponse, - ListExternalAdmissionHookConfigurationResponse, - PatchExternalAdmissionHookConfigurationResponse, - ReadExternalAdmissionHookConfigurationOptional, ReadExternalAdmissionHookConfigurationResponse, - ReplaceExternalAdmissionHookConfigurationOptional, ReplaceExternalAdmissionHookConfigurationResponse, - WatchExternalAdmissionHookConfigurationResponse, -}; +pub use self::external_admission_hook_configuration::ExternalAdmissionHookConfiguration; +#[cfg(feature = "api")] pub use self::external_admission_hook_configuration::{CreateExternalAdmissionHookConfigurationOptional, CreateExternalAdmissionHookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::external_admission_hook_configuration::DeleteCollectionExternalAdmissionHookConfigurationResponse; +#[cfg(feature = "api")] pub use self::external_admission_hook_configuration::DeleteExternalAdmissionHookConfigurationResponse; +#[cfg(feature = "api")] pub use self::external_admission_hook_configuration::ListExternalAdmissionHookConfigurationResponse; +#[cfg(feature = "api")] pub use self::external_admission_hook_configuration::PatchExternalAdmissionHookConfigurationResponse; +#[cfg(feature = "api")] pub use self::external_admission_hook_configuration::{ReadExternalAdmissionHookConfigurationOptional, ReadExternalAdmissionHookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::external_admission_hook_configuration::{ReplaceExternalAdmissionHookConfigurationOptional, ReplaceExternalAdmissionHookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::external_admission_hook_configuration::WatchExternalAdmissionHookConfigurationResponse; mod external_admission_hook_configuration_list; -pub use self::external_admission_hook_configuration_list::{ - ExternalAdmissionHookConfigurationList, -}; +pub use self::external_admission_hook_configuration_list::ExternalAdmissionHookConfigurationList; mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializer_configuration; -pub use self::initializer_configuration::{ - InitializerConfiguration, - CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse, - DeleteCollectionInitializerConfigurationResponse, - DeleteInitializerConfigurationResponse, - ListInitializerConfigurationResponse, - PatchInitializerConfigurationResponse, - ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse, - ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse, - WatchInitializerConfigurationResponse, -}; +pub use self::initializer_configuration::InitializerConfiguration; +#[cfg(feature = "api")] pub use self::initializer_configuration::{CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteCollectionInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::ListInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::PatchInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::WatchInitializerConfigurationResponse; mod initializer_configuration_list; -pub use self::initializer_configuration_list::{ - InitializerConfigurationList, -}; +pub use self::initializer_configuration_list::InitializerConfigurationList; mod rule; -pub use self::rule::{ - Rule, -}; +pub use self::rule::Rule; mod rule_with_operations; -pub use self::rule_with_operations::{ - RuleWithOperations, -}; +pub use self::rule_with_operations::RuleWithOperations; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_8/api/apps/v1beta1/controller_revision.rs b/src/v1_8/api/apps/v1beta1/controller_revision.rs index 87aadcf741..5c8470e2c1 100644 --- a/src/v1_8/api/apps/v1beta1/controller_revision.rs +++ b/src/v1_8/api/apps/v1beta1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_8::api::apps::v1beta1::ControllerRevision, @@ -61,6 +62,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_8::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_8::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_8::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_8::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +551,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -568,6 +588,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -579,12 +600,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_8::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +659,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -666,6 +690,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -673,12 +698,14 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_8::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -722,6 +749,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -740,12 +768,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -795,6 +825,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -816,12 +847,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/apps/v1beta1/deployment.rs b/src/v1_8/api/apps/v1beta1/deployment.rs index bd3a5565d6..f2b393c823 100644 --- a/src/v1_8/api/apps/v1beta1/deployment.rs +++ b/src/v1_8/api/apps/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_8::api::apps::v1beta1::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_8::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_8::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_8::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_8::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_8::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_8::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_8::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_8::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_8::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -992,6 +1030,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1010,12 +1049,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1106,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1086,12 +1128,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/apps/v1beta1/deployment_rollback.rs b/src/v1_8/api/apps/v1beta1/deployment_rollback.rs index 09832a5da4..8d5d6b8c5b 100644 --- a/src/v1_8/api/apps/v1beta1/deployment_rollback.rs +++ b/src/v1_8/api/apps/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -67,6 +68,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// If 'true', then the output is pretty printed. @@ -74,12 +76,14 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/apps/v1beta1/mod.rs b/src/v1_8/api/apps/v1beta1/mod.rs index ab9d53715e..f70124a5ff 100644 --- a/src/v1_8/api/apps/v1beta1/mod.rs +++ b/src/v1_8/api/apps/v1beta1/mod.rs @@ -1,143 +1,103 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_8/api/apps/v1beta1/scale.rs b/src/v1_8/api/apps/v1beta1/scale.rs index 13c586f1d5..8f019db614 100644 --- a/src/v1_8/api/apps/v1beta1/scale.rs +++ b/src/v1_8/api/apps/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_8::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_8::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -207,6 +213,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -235,6 +242,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -242,12 +250,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_8::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -325,6 +336,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -332,12 +344,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_8::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +403,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -419,6 +434,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -426,12 +442,14 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_8::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -483,6 +501,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -513,6 +532,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -520,12 +540,14 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_8::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/apps/v1beta1/stateful_set.rs b/src/v1_8/api/apps/v1beta1/stateful_set.rs index a76ea02a3c..08a42645eb 100644 --- a/src/v1_8/api/apps/v1beta1/stateful_set.rs +++ b/src/v1_8/api/apps/v1beta1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_8::api::apps::v1beta1::StatefulSet, @@ -63,6 +64,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -70,12 +72,14 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_8::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -125,6 +129,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -148,6 +153,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -155,6 +161,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -217,6 +224,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -238,6 +246,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -245,6 +254,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -305,6 +315,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -326,12 +337,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_8::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -375,6 +388,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -393,12 +407,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_8::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -450,6 +466,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -479,12 +496,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_8::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -536,6 +555,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -565,12 +585,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -620,6 +642,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -656,6 +679,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -667,12 +691,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_8::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -722,6 +748,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -750,6 +777,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -757,12 +785,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -814,6 +844,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -844,6 +875,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -851,12 +883,14 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_8::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -908,6 +942,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -938,6 +973,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -945,12 +981,14 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -998,6 +1036,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1019,12 +1058,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1070,6 +1111,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1088,12 +1130,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/apps/v1beta2/controller_revision.rs b/src/v1_8/api/apps/v1beta2/controller_revision.rs index f941f03236..e7829917f3 100644 --- a/src/v1_8/api/apps/v1beta2/controller_revision.rs +++ b/src/v1_8/api/apps/v1beta2/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_8::api::apps::v1beta2::ControllerRevision, @@ -61,6 +62,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_8::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_8::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_8::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_8::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +551,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -568,6 +588,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -579,12 +600,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_8::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +659,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -666,6 +690,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -673,12 +698,14 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_8::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -722,6 +749,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -740,12 +768,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -795,6 +825,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -816,12 +847,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/apps/v1beta2/daemon_set.rs b/src/v1_8/api/apps/v1beta2/daemon_set.rs index aa5672aa68..df658f2b94 100644 --- a/src/v1_8/api/apps/v1beta2/daemon_set.rs +++ b/src/v1_8/api/apps/v1beta2/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_8::api::apps::v1beta2::DaemonSet, @@ -61,6 +62,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_8::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_8::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_8::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_8::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_8::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_8::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -992,6 +1030,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1010,12 +1049,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1106,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1086,12 +1128,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/apps/v1beta2/deployment.rs b/src/v1_8/api/apps/v1beta2/deployment.rs index b76327dfc7..e60f3de688 100644 --- a/src/v1_8/api/apps/v1beta2/deployment.rs +++ b/src/v1_8/api/apps/v1beta2/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_8::api::apps::v1beta2::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_8::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_8::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_8::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_8::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_8::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_8::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -992,6 +1030,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1010,12 +1049,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1106,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1086,12 +1128,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/apps/v1beta2/mod.rs b/src/v1_8/api/apps/v1beta2/mod.rs index 38b602ae1c..53ebfc888b 100644 --- a/src/v1_8/api/apps/v1beta2/mod.rs +++ b/src/v1_8/api/apps/v1beta2/mod.rs @@ -1,216 +1,158 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_8/api/apps/v1beta2/replica_set.rs b/src/v1_8/api/apps/v1beta2/replica_set.rs index c7c5135c08..f37dc37e66 100644 --- a/src/v1_8/api/apps/v1beta2/replica_set.rs +++ b/src/v1_8/api/apps/v1beta2/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_8::api::apps::v1beta2::ReplicaSet, @@ -61,6 +62,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_8::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -303,6 +313,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -324,12 +335,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_8::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +386,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +405,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_8::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_8::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_8::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_8::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -996,6 +1034,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1017,12 +1056,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1068,6 +1109,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1086,12 +1128,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/apps/v1beta2/scale.rs b/src/v1_8/api/apps/v1beta2/scale.rs index 827e8e1519..bc6453fe68 100644 --- a/src/v1_8/api/apps/v1beta2/scale.rs +++ b/src/v1_8/api/apps/v1beta2/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_8::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_8::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_8::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_8::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_8::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_8::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -595,6 +617,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -602,12 +625,14 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_8::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +684,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -689,6 +715,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -696,12 +723,14 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_8::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -753,6 +782,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -783,6 +813,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -790,12 +821,14 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_8::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/apps/v1beta2/stateful_set.rs b/src/v1_8/api/apps/v1beta2/stateful_set.rs index f37a47e01f..e02db9d555 100644 --- a/src/v1_8/api/apps/v1beta2/stateful_set.rs +++ b/src/v1_8/api/apps/v1beta2/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_8::api::apps::v1beta2::StatefulSet, @@ -63,6 +64,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -70,12 +72,14 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_8::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -125,6 +129,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -148,6 +153,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -155,6 +161,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -217,6 +224,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -238,6 +246,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -245,6 +254,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -305,6 +315,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -326,12 +337,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_8::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -375,6 +388,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -393,12 +407,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_8::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -450,6 +466,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -479,12 +496,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_8::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -536,6 +555,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -565,12 +585,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -620,6 +642,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -656,6 +679,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -667,12 +691,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_8::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -722,6 +748,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -750,6 +777,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -757,12 +785,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -814,6 +844,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -844,6 +875,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -851,12 +883,14 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_8::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -908,6 +942,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -938,6 +973,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -945,12 +981,14 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_8::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -998,6 +1036,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1019,12 +1058,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1070,6 +1111,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1088,12 +1130,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/authentication/v1/mod.rs b/src/v1_8/api/authentication/v1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_8/api/authentication/v1/mod.rs +++ b/src/v1_8/api/authentication/v1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_8/api/authentication/v1/token_review.rs b/src/v1_8/api/authentication/v1/token_review.rs index c38a39e951..3618b3a0d3 100644 --- a/src/v1_8/api/authentication/v1/token_review.rs +++ b/src/v1_8/api/authentication/v1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_8::api::authentication::v1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -53,6 +54,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,12 +62,14 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_8::api::authentication::v1::TokenReview), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/authentication/v1beta1/mod.rs b/src/v1_8/api/authentication/v1beta1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_8/api/authentication/v1beta1/mod.rs +++ b/src/v1_8/api/authentication/v1beta1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_8/api/authentication/v1beta1/token_review.rs b/src/v1_8/api/authentication/v1beta1/token_review.rs index 9e7ae1e4c0..8ca9ba7340 100644 --- a/src/v1_8/api/authentication/v1beta1/token_review.rs +++ b/src/v1_8/api/authentication/v1beta1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_8::api::authentication::v1beta1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -53,6 +54,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,12 +62,14 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_8::api::authentication::v1beta1::TokenReview), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/authorization/v1/local_subject_access_review.rs b/src/v1_8/api/authorization/v1/local_subject_access_review.rs index c7ce7cbf29..dd54646e29 100644 --- a/src/v1_8/api/authorization/v1/local_subject_access_review.rs +++ b/src/v1_8/api/authorization/v1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_8::api::authorization::v1::LocalSubjectAccessReview, @@ -60,6 +61,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,12 +69,14 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_8::api::authorization::v1::LocalSubjectAccessReview), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/authorization/v1/mod.rs b/src/v1_8/api/authorization/v1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_8/api/authorization/v1/mod.rs +++ b/src/v1_8/api/authorization/v1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_8/api/authorization/v1/self_subject_access_review.rs b/src/v1_8/api/authorization/v1/self_subject_access_review.rs index 83cb73150f..e88ad7cc23 100644 --- a/src/v1_8/api/authorization/v1/self_subject_access_review.rs +++ b/src/v1_8/api/authorization/v1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_8::api::authorization::v1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,12 +62,14 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_8::api::authorization::v1::SelfSubjectAccessReview), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/authorization/v1/self_subject_rules_review.rs b/src/v1_8/api/authorization/v1/self_subject_rules_review.rs index be2c4721f8..a92bb5adeb 100644 --- a/src/v1_8/api/authorization/v1/self_subject_rules_review.rs +++ b/src/v1_8/api/authorization/v1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_8::api::authorization::v1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,12 +62,14 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_8::api::authorization::v1::SelfSubjectRulesReview), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/authorization/v1/subject_access_review.rs b/src/v1_8/api/authorization/v1/subject_access_review.rs index 7386e10b60..d7dcd5a87a 100644 --- a/src/v1_8/api/authorization/v1/subject_access_review.rs +++ b/src/v1_8/api/authorization/v1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_8::api::authorization::v1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,12 +62,14 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_8::api::authorization::v1::SubjectAccessReview), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/authorization/v1beta1/local_subject_access_review.rs b/src/v1_8/api/authorization/v1beta1/local_subject_access_review.rs index 1fd45ef935..07c3ab68de 100644 --- a/src/v1_8/api/authorization/v1beta1/local_subject_access_review.rs +++ b/src/v1_8/api/authorization/v1beta1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_8::api::authorization::v1beta1::LocalSubjectAccessReview, @@ -60,6 +61,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,12 +69,14 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_8::api::authorization::v1beta1::LocalSubjectAccessReview), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/authorization/v1beta1/mod.rs b/src/v1_8/api/authorization/v1beta1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_8/api/authorization/v1beta1/mod.rs +++ b/src/v1_8/api/authorization/v1beta1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_8/api/authorization/v1beta1/self_subject_access_review.rs b/src/v1_8/api/authorization/v1beta1/self_subject_access_review.rs index d7e3fa7c45..f271b99ffc 100644 --- a/src/v1_8/api/authorization/v1beta1/self_subject_access_review.rs +++ b/src/v1_8/api/authorization/v1beta1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_8::api::authorization::v1beta1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,12 +62,14 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_8::api::authorization::v1beta1::SelfSubjectAccessReview), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/authorization/v1beta1/self_subject_rules_review.rs b/src/v1_8/api/authorization/v1beta1/self_subject_rules_review.rs index 0659652b46..94e547b655 100644 --- a/src/v1_8/api/authorization/v1beta1/self_subject_rules_review.rs +++ b/src/v1_8/api/authorization/v1beta1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_8::api::authorization::v1beta1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,12 +62,14 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_8::api::authorization::v1beta1::SelfSubjectRulesReview), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/authorization/v1beta1/subject_access_review.rs b/src/v1_8/api/authorization/v1beta1/subject_access_review.rs index 0c1daaf048..88b446bc62 100644 --- a/src/v1_8/api/authorization/v1beta1/subject_access_review.rs +++ b/src/v1_8/api/authorization/v1beta1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_8::api::authorization::v1beta1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,12 +62,14 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_8::api::authorization::v1beta1::SubjectAccessReview), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/autoscaling/v1/horizontal_pod_autoscaler.rs b/src/v1_8/api/autoscaling/v1/horizontal_pod_autoscaler.rs index d78e0ad698..a98def13c4 100644 --- a/src/v1_8/api/autoscaling/v1/horizontal_pod_autoscaler.rs +++ b/src/v1_8/api/autoscaling/v1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_8::api::autoscaling::v1::HorizontalPodAutoscaler, @@ -61,6 +62,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_8::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_8::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_8::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_8::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -992,6 +1030,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1010,12 +1049,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1106,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1086,12 +1128,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/autoscaling/v1/mod.rs b/src/v1_8/api/autoscaling/v1/mod.rs index 2d0ddff00f..64683b81db 100644 --- a/src/v1_8/api/autoscaling/v1/mod.rs +++ b/src/v1_8/api/autoscaling/v1/mod.rs @@ -1,56 +1,40 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedReplicationControllerScaleResponse, - ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse, - ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; diff --git a/src/v1_8/api/autoscaling/v1/scale.rs b/src/v1_8/api/autoscaling/v1/scale.rs index a20feef0b0..704bdc899a 100644 --- a/src/v1_8/api/autoscaling/v1/scale.rs +++ b/src/v1_8/api/autoscaling/v1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerScaleResponse { Ok(crate::v1_8::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -121,6 +124,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -149,6 +153,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -156,12 +161,14 @@ pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerScaleResponse { Ok(crate::v1_8::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -213,6 +220,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -243,6 +251,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -250,12 +259,14 @@ pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerScaleResponse { Ok(crate::v1_8::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs b/src/v1_8/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs index e214b9510f..10f3086273 100644 --- a/src/v1_8/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs +++ b/src/v1_8/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_8::api::autoscaling::v2beta1::HorizontalPodAutoscaler, @@ -61,6 +62,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_8::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_8::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_8::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_8::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -992,6 +1030,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1010,12 +1049,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1106,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1086,12 +1128,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/autoscaling/v2beta1/mod.rs b/src/v1_8/api/autoscaling/v2beta1/mod.rs index 140b43f6c6..7bfd9d8f5b 100644 --- a/src/v1_8/api/autoscaling/v2beta1/mod.rs +++ b/src/v1_8/api/autoscaling/v2beta1/mod.rs @@ -1,83 +1,55 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_8/api/batch/v1/job.rs b/src/v1_8/api/batch/v1/job.rs index aa05e33a69..b3a2f4fa96 100644 --- a/src/v1_8/api/batch/v1/job.rs +++ b/src/v1_8/api/batch/v1/job.rs @@ -33,6 +33,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_job( namespace: &str, body: &crate::v1_8::api::batch::v1::Job, @@ -61,6 +62,7 @@ impl Job { } /// Optional parameters of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedJobResponse { Ok(crate::v1_8::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl Job { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_job( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_collection_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedJobResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_job( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedJobResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_job_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListJobForAllNamespacesResponse { Ok(crate::v1_8::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_job( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedJobResponse { Ok(crate::v1_8::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobResponse { Ok(crate::v1_8::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobStatusResponse { Ok(crate::v1_8::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobResponse { Ok(crate::v1_8::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobStatusResponse { Ok(crate::v1_8::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobResponse { Ok(crate::v1_8::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobStatusResponse { Ok(crate::v1_8::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -992,6 +1030,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_job_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1010,12 +1049,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchJobForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1106,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_job( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1086,12 +1128,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedJobResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/batch/v1/mod.rs b/src/v1_8/api/batch/v1/mod.rs index 68e7a18867..97d7bccb74 100644 --- a/src/v1_8/api/batch/v1/mod.rs +++ b/src/v1_8/api/batch/v1/mod.rs @@ -1,38 +1,28 @@ mod job; -pub use self::job::{ - Job, - CreateNamespacedJobOptional, CreateNamespacedJobResponse, - DeleteCollectionNamespacedJobResponse, - DeleteNamespacedJobResponse, - ListJobForAllNamespacesResponse, - ListNamespacedJobResponse, - PatchNamespacedJobResponse, - PatchNamespacedJobStatusResponse, - ReadNamespacedJobOptional, ReadNamespacedJobResponse, - ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse, - ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse, - ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse, - WatchJobForAllNamespacesResponse, - WatchNamespacedJobResponse, -}; +pub use self::job::Job; +#[cfg(feature = "api")] pub use self::job::{CreateNamespacedJobOptional, CreateNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::DeleteCollectionNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::DeleteNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::ListJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::ListNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobStatusResponse; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobOptional, ReadNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::WatchJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::WatchNamespacedJobResponse; mod job_condition; -pub use self::job_condition::{ - JobCondition, -}; +pub use self::job_condition::JobCondition; mod job_list; -pub use self::job_list::{ - JobList, -}; +pub use self::job_list::JobList; mod job_spec; -pub use self::job_spec::{ - JobSpec, -}; +pub use self::job_spec::JobSpec; mod job_status; -pub use self::job_status::{ - JobStatus, -}; +pub use self::job_status::JobStatus; diff --git a/src/v1_8/api/batch/v1beta1/cron_job.rs b/src/v1_8/api/batch/v1beta1/cron_job.rs index edb0b89d98..b38766ce0b 100644 --- a/src/v1_8/api/batch/v1beta1/cron_job.rs +++ b/src/v1_8/api/batch/v1beta1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_8::api::batch::v1beta1::CronJob, @@ -61,6 +62,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_8::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_8::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_8::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_8::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_8::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_8::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_8::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_8::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_8::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -992,6 +1030,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1010,12 +1049,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1106,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1086,12 +1128,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/batch/v1beta1/mod.rs b/src/v1_8/api/batch/v1beta1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_8/api/batch/v1beta1/mod.rs +++ b/src/v1_8/api/batch/v1beta1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_8/api/batch/v2alpha1/cron_job.rs b/src/v1_8/api/batch/v2alpha1/cron_job.rs index 3087b798f6..e584923412 100644 --- a/src/v1_8/api/batch/v2alpha1/cron_job.rs +++ b/src/v1_8/api/batch/v2alpha1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_8::api::batch::v2alpha1::CronJob, @@ -61,6 +62,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_8::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_8::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_8::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_8::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_8::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_8::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_8::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_8::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_8::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -992,6 +1030,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1010,12 +1049,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1106,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1086,12 +1128,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/batch/v2alpha1/mod.rs b/src/v1_8/api/batch/v2alpha1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_8/api/batch/v2alpha1/mod.rs +++ b/src/v1_8/api/batch/v2alpha1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_8/api/certificates/v1beta1/certificate_signing_request.rs b/src/v1_8/api/certificates/v1beta1/certificate_signing_request.rs index 4cb4ccac64..6ada7a767c 100644 --- a/src/v1_8/api/certificates/v1beta1/certificate_signing_request.rs +++ b/src/v1_8/api/certificates/v1beta1/certificate_signing_request.rs @@ -28,6 +28,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_certificate_signing_request( body: &crate::v1_8::api::certificates::v1beta1::CertificateSigningRequest, optional: CreateCertificateSigningRequestOptional<'_>, @@ -53,6 +54,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCertificateSigningRequestOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,12 +62,14 @@ pub struct CreateCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCertificateSigningRequestResponse { Ok(crate::v1_8::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -111,6 +115,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_certificate_signing_request( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -130,6 +135,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCertificateSigningRequestResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -137,6 +143,7 @@ pub enum DeleteCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -195,6 +202,7 @@ impl CertificateSigningRequest { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_certificate_signing_request( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -215,6 +223,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_collection_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCertificateSigningRequestResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -222,6 +231,7 @@ pub enum DeleteCollectionCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -278,6 +288,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_certificate_signing_request( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -296,12 +307,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::list_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCertificateSigningRequestResponse { Ok(crate::v1_8::api::certificates::v1beta1::CertificateSigningRequestList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -349,6 +362,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -376,12 +390,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestResponse { Ok(crate::v1_8::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -427,6 +443,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request( name: &str, optional: ReadCertificateSigningRequestOptional<'_>, @@ -461,6 +478,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -472,12 +490,14 @@ pub struct ReadCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestResponse { Ok(crate::v1_8::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -525,6 +545,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request( name: &str, body: &crate::v1_8::api::certificates::v1beta1::CertificateSigningRequest, @@ -553,6 +574,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestOptional<'a> { /// If 'true', then the output is pretty printed. @@ -560,12 +582,14 @@ pub struct ReplaceCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestResponse { Ok(crate::v1_8::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -613,6 +637,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_approval( name: &str, body: &crate::v1_8::api::certificates::v1beta1::CertificateSigningRequest, @@ -641,6 +666,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { /// If 'true', then the output is pretty printed. @@ -648,12 +674,14 @@ pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestApprovalResponse { Ok(crate::v1_8::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestApprovalResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -701,6 +729,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_status( name: &str, body: &crate::v1_8::api::certificates::v1beta1::CertificateSigningRequest, @@ -729,6 +758,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -736,12 +766,14 @@ pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestStatusResponse { Ok(crate::v1_8::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -785,6 +817,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_certificate_signing_request( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -803,12 +836,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::watch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCertificateSigningRequestResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/certificates/v1beta1/mod.rs b/src/v1_8/api/certificates/v1beta1/mod.rs index 7550699fa0..1e75e0820e 100644 --- a/src/v1_8/api/certificates/v1beta1/mod.rs +++ b/src/v1_8/api/certificates/v1beta1/mod.rs @@ -1,35 +1,25 @@ mod certificate_signing_request; -pub use self::certificate_signing_request::{ - CertificateSigningRequest, - CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse, - DeleteCertificateSigningRequestResponse, - DeleteCollectionCertificateSigningRequestResponse, - ListCertificateSigningRequestResponse, - PatchCertificateSigningRequestResponse, - ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse, - ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse, - ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse, - ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse, - WatchCertificateSigningRequestResponse, -}; +pub use self::certificate_signing_request::CertificateSigningRequest; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCollectionCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::ListCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::WatchCertificateSigningRequestResponse; mod certificate_signing_request_condition; -pub use self::certificate_signing_request_condition::{ - CertificateSigningRequestCondition, -}; +pub use self::certificate_signing_request_condition::CertificateSigningRequestCondition; mod certificate_signing_request_list; -pub use self::certificate_signing_request_list::{ - CertificateSigningRequestList, -}; +pub use self::certificate_signing_request_list::CertificateSigningRequestList; mod certificate_signing_request_spec; -pub use self::certificate_signing_request_spec::{ - CertificateSigningRequestSpec, -}; +pub use self::certificate_signing_request_spec::CertificateSigningRequestSpec; mod certificate_signing_request_status; -pub use self::certificate_signing_request_status::{ - CertificateSigningRequestStatus, -}; +pub use self::certificate_signing_request_status::CertificateSigningRequestStatus; diff --git a/src/v1_8/api/core/v1/binding.rs b/src/v1_8/api/core/v1/binding.rs index 19d901a561..d606d4e44b 100644 --- a/src/v1_8/api/core/v1/binding.rs +++ b/src/v1_8/api/core/v1/binding.rs @@ -30,6 +30,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_binding( namespace: &str, body: &crate::v1_8::api::core::v1::Binding, @@ -58,6 +59,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,12 +67,14 @@ pub struct CreateNamespacedBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedBindingResponse { Ok(crate::v1_8::api::core::v1::Binding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -122,6 +126,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_binding( name: &str, namespace: &str, @@ -152,6 +157,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -159,12 +165,14 @@ pub struct CreateNamespacedPodBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodBindingResponse { Ok(crate::v1_8::api::core::v1::Binding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/component_status.rs b/src/v1_8/api/core/v1/component_status.rs index 6761fbd9a7..2326c07955 100644 --- a/src/v1_8/api/core/v1/component_status.rs +++ b/src/v1_8/api/core/v1/component_status.rs @@ -26,6 +26,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_component_status( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -44,12 +45,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::list_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListComponentStatusResponse { Ok(crate::v1_8::api::core::v1::ComponentStatusList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -95,6 +98,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_component_status( name: &str, optional: ReadComponentStatusOptional<'_>, @@ -121,6 +125,7 @@ impl ComponentStatus { } /// Optional parameters of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadComponentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -128,12 +133,14 @@ pub struct ReadComponentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadComponentStatusResponse { Ok(crate::v1_8::api::core::v1::ComponentStatus), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -177,6 +184,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_component_status( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -195,12 +203,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::watch_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchComponentStatusResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/config_map.rs b/src/v1_8/api/core/v1/config_map.rs index 52b00b6b23..8dc60bdafa 100644 --- a/src/v1_8/api/core/v1/config_map.rs +++ b/src/v1_8/api/core/v1/config_map.rs @@ -30,6 +30,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_config_map( namespace: &str, body: &crate::v1_8::api::core::v1::ConfigMap, @@ -58,6 +59,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedConfigMapOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,12 +67,14 @@ pub struct CreateNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedConfigMapResponse { Ok(crate::v1_8::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -120,6 +124,7 @@ impl ConfigMap { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_config_map( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -143,6 +148,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_collection_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedConfigMapResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -150,6 +156,7 @@ pub enum DeleteCollectionNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_config_map( name: &str, namespace: &str, @@ -233,6 +241,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedConfigMapResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_config_map_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListConfigMapForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_config_map( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -388,12 +402,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedConfigMapResponse { Ok(crate::v1_8::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_config_map( name: &str, namespace: &str, @@ -474,12 +491,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::patch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedConfigMapResponse { Ok(crate::v1_8::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -529,6 +548,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_config_map( name: &str, namespace: &str, @@ -565,6 +585,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedConfigMapOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -576,12 +597,14 @@ pub struct ReadNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedConfigMapResponse { Ok(crate::v1_8::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -633,6 +656,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_config_map( name: &str, namespace: &str, @@ -663,6 +687,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedConfigMapOptional<'a> { /// If 'true', then the output is pretty printed. @@ -670,12 +695,14 @@ pub struct ReplaceNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedConfigMapResponse { Ok(crate::v1_8::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -719,6 +746,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_config_map_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -737,12 +765,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchConfigMapForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -792,6 +822,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_config_map( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -813,12 +844,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedConfigMapResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/endpoints.rs b/src/v1_8/api/core/v1/endpoints.rs index 9c34b3c5a4..dea9eb83eb 100644 --- a/src/v1_8/api/core/v1/endpoints.rs +++ b/src/v1_8/api/core/v1/endpoints.rs @@ -41,6 +41,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_endpoints( namespace: &str, body: &crate::v1_8::api::core::v1::Endpoints, @@ -69,6 +70,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEndpointsOptional<'a> { /// If 'true', then the output is pretty printed. @@ -76,12 +78,14 @@ pub struct CreateNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEndpointsResponse { Ok(crate::v1_8::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -131,6 +135,7 @@ impl Endpoints { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_endpoints( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -154,6 +159,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_collection_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEndpointsResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -161,6 +167,7 @@ pub enum DeleteCollectionNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -223,6 +230,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_endpoints( name: &str, namespace: &str, @@ -244,6 +252,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEndpointsResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -251,6 +260,7 @@ pub enum DeleteNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -307,6 +317,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_endpoints_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -325,12 +336,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEndpointsForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -378,6 +391,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_endpoints( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -399,12 +413,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEndpointsResponse { Ok(crate::v1_8::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -456,6 +472,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_endpoints( name: &str, namespace: &str, @@ -485,12 +502,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::patch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEndpointsResponse { Ok(crate::v1_8::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -540,6 +559,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_endpoints( name: &str, namespace: &str, @@ -576,6 +596,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEndpointsOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -587,12 +608,14 @@ pub struct ReadNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEndpointsResponse { Ok(crate::v1_8::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -644,6 +667,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_endpoints( name: &str, namespace: &str, @@ -674,6 +698,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEndpointsOptional<'a> { /// If 'true', then the output is pretty printed. @@ -681,12 +706,14 @@ pub struct ReplaceNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEndpointsResponse { Ok(crate::v1_8::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -730,6 +757,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_endpoints_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -748,12 +776,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEndpointsForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -803,6 +833,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_endpoints( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -824,12 +855,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEndpointsResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/event.rs b/src/v1_8/api/core/v1/event.rs index f1779724bd..c119dabb55 100644 --- a/src/v1_8/api/core/v1/event.rs +++ b/src/v1_8/api/core/v1/event.rs @@ -51,6 +51,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_8::api::core::v1::Event, @@ -79,6 +80,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -86,12 +88,14 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_8::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_8::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_8::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_8::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,12 +716,14 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_8::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -740,6 +767,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -758,12 +786,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -813,6 +843,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -834,12 +865,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/limit_range.rs b/src/v1_8/api/core/v1/limit_range.rs index daf70d2454..52c234f34c 100644 --- a/src/v1_8/api/core/v1/limit_range.rs +++ b/src/v1_8/api/core/v1/limit_range.rs @@ -30,6 +30,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_limit_range( namespace: &str, body: &crate::v1_8::api::core::v1::LimitRange, @@ -58,6 +59,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLimitRangeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,12 +67,14 @@ pub struct CreateNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLimitRangeResponse { Ok(crate::v1_8::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -120,6 +124,7 @@ impl LimitRange { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_limit_range( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -143,6 +148,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_collection_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLimitRangeResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -150,6 +156,7 @@ pub enum DeleteCollectionNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_limit_range( name: &str, namespace: &str, @@ -233,6 +241,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLimitRangeResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_limit_range_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLimitRangeForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_limit_range( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -388,12 +402,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLimitRangeResponse { Ok(crate::v1_8::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_limit_range( name: &str, namespace: &str, @@ -474,12 +491,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::patch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLimitRangeResponse { Ok(crate::v1_8::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -529,6 +548,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_limit_range( name: &str, namespace: &str, @@ -565,6 +585,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLimitRangeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -576,12 +597,14 @@ pub struct ReadNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLimitRangeResponse { Ok(crate::v1_8::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -633,6 +656,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_limit_range( name: &str, namespace: &str, @@ -663,6 +687,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLimitRangeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -670,12 +695,14 @@ pub struct ReplaceNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLimitRangeResponse { Ok(crate::v1_8::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -719,6 +746,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_limit_range_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -737,12 +765,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLimitRangeForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -792,6 +822,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_limit_range( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -813,12 +844,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLimitRangeResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/mod.rs b/src/v1_8/api/core/v1/mod.rs index 180bf7561b..ad7615a654 100644 --- a/src/v1_8/api/core/v1/mod.rs +++ b/src/v1_8/api/core/v1/mod.rs @@ -1,1024 +1,710 @@ mod aws_elastic_block_store_volume_source; -pub use self::aws_elastic_block_store_volume_source::{ - AWSElasticBlockStoreVolumeSource, -}; +pub use self::aws_elastic_block_store_volume_source::AWSElasticBlockStoreVolumeSource; mod affinity; -pub use self::affinity::{ - Affinity, -}; +pub use self::affinity::Affinity; mod attached_volume; -pub use self::attached_volume::{ - AttachedVolume, -}; +pub use self::attached_volume::AttachedVolume; mod azure_disk_volume_source; -pub use self::azure_disk_volume_source::{ - AzureDiskVolumeSource, -}; +pub use self::azure_disk_volume_source::AzureDiskVolumeSource; mod azure_file_persistent_volume_source; -pub use self::azure_file_persistent_volume_source::{ - AzureFilePersistentVolumeSource, -}; +pub use self::azure_file_persistent_volume_source::AzureFilePersistentVolumeSource; mod azure_file_volume_source; -pub use self::azure_file_volume_source::{ - AzureFileVolumeSource, -}; +pub use self::azure_file_volume_source::AzureFileVolumeSource; mod binding; -pub use self::binding::{ - Binding, - CreateNamespacedBindingOptional, CreateNamespacedBindingResponse, - CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse, -}; +pub use self::binding::Binding; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedBindingOptional, CreateNamespacedBindingResponse}; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse}; mod capabilities; -pub use self::capabilities::{ - Capabilities, -}; +pub use self::capabilities::Capabilities; mod ceph_fs_persistent_volume_source; -pub use self::ceph_fs_persistent_volume_source::{ - CephFSPersistentVolumeSource, -}; +pub use self::ceph_fs_persistent_volume_source::CephFSPersistentVolumeSource; mod ceph_fs_volume_source; -pub use self::ceph_fs_volume_source::{ - CephFSVolumeSource, -}; +pub use self::ceph_fs_volume_source::CephFSVolumeSource; mod cinder_volume_source; -pub use self::cinder_volume_source::{ - CinderVolumeSource, -}; +pub use self::cinder_volume_source::CinderVolumeSource; mod client_ip_config; -pub use self::client_ip_config::{ - ClientIPConfig, -}; +pub use self::client_ip_config::ClientIPConfig; mod component_condition; -pub use self::component_condition::{ - ComponentCondition, -}; +pub use self::component_condition::ComponentCondition; mod component_status; -pub use self::component_status::{ - ComponentStatus, - ListComponentStatusResponse, - ReadComponentStatusOptional, ReadComponentStatusResponse, - WatchComponentStatusResponse, -}; +pub use self::component_status::ComponentStatus; +#[cfg(feature = "api")] pub use self::component_status::ListComponentStatusResponse; +#[cfg(feature = "api")] pub use self::component_status::{ReadComponentStatusOptional, ReadComponentStatusResponse}; +#[cfg(feature = "api")] pub use self::component_status::WatchComponentStatusResponse; mod component_status_list; -pub use self::component_status_list::{ - ComponentStatusList, -}; +pub use self::component_status_list::ComponentStatusList; mod config_map; -pub use self::config_map::{ - ConfigMap, - CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse, - DeleteCollectionNamespacedConfigMapResponse, - DeleteNamespacedConfigMapResponse, - ListConfigMapForAllNamespacesResponse, - ListNamespacedConfigMapResponse, - PatchNamespacedConfigMapResponse, - ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse, - ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse, - WatchConfigMapForAllNamespacesResponse, - WatchNamespacedConfigMapResponse, -}; +pub use self::config_map::ConfigMap; +#[cfg(feature = "api")] pub use self::config_map::{CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::DeleteCollectionNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::DeleteNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::ListConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::ListNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::PatchNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::{ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::{ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::WatchConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::WatchNamespacedConfigMapResponse; mod config_map_env_source; -pub use self::config_map_env_source::{ - ConfigMapEnvSource, -}; +pub use self::config_map_env_source::ConfigMapEnvSource; mod config_map_key_selector; -pub use self::config_map_key_selector::{ - ConfigMapKeySelector, -}; +pub use self::config_map_key_selector::ConfigMapKeySelector; mod config_map_list; -pub use self::config_map_list::{ - ConfigMapList, -}; +pub use self::config_map_list::ConfigMapList; mod config_map_projection; -pub use self::config_map_projection::{ - ConfigMapProjection, -}; +pub use self::config_map_projection::ConfigMapProjection; mod config_map_volume_source; -pub use self::config_map_volume_source::{ - ConfigMapVolumeSource, -}; +pub use self::config_map_volume_source::ConfigMapVolumeSource; mod container; -pub use self::container::{ - Container, -}; +pub use self::container::Container; mod container_image; -pub use self::container_image::{ - ContainerImage, -}; +pub use self::container_image::ContainerImage; mod container_port; -pub use self::container_port::{ - ContainerPort, -}; +pub use self::container_port::ContainerPort; mod container_state; -pub use self::container_state::{ - ContainerState, -}; +pub use self::container_state::ContainerState; mod container_state_running; -pub use self::container_state_running::{ - ContainerStateRunning, -}; +pub use self::container_state_running::ContainerStateRunning; mod container_state_terminated; -pub use self::container_state_terminated::{ - ContainerStateTerminated, -}; +pub use self::container_state_terminated::ContainerStateTerminated; mod container_state_waiting; -pub use self::container_state_waiting::{ - ContainerStateWaiting, -}; +pub use self::container_state_waiting::ContainerStateWaiting; mod container_status; -pub use self::container_status::{ - ContainerStatus, -}; +pub use self::container_status::ContainerStatus; mod daemon_endpoint; -pub use self::daemon_endpoint::{ - DaemonEndpoint, -}; +pub use self::daemon_endpoint::DaemonEndpoint; mod downward_api_projection; -pub use self::downward_api_projection::{ - DownwardAPIProjection, -}; +pub use self::downward_api_projection::DownwardAPIProjection; mod downward_api_volume_file; -pub use self::downward_api_volume_file::{ - DownwardAPIVolumeFile, -}; +pub use self::downward_api_volume_file::DownwardAPIVolumeFile; mod downward_api_volume_source; -pub use self::downward_api_volume_source::{ - DownwardAPIVolumeSource, -}; +pub use self::downward_api_volume_source::DownwardAPIVolumeSource; mod empty_dir_volume_source; -pub use self::empty_dir_volume_source::{ - EmptyDirVolumeSource, -}; +pub use self::empty_dir_volume_source::EmptyDirVolumeSource; mod endpoint_address; -pub use self::endpoint_address::{ - EndpointAddress, -}; +pub use self::endpoint_address::EndpointAddress; mod endpoint_port; -pub use self::endpoint_port::{ - EndpointPort, -}; +pub use self::endpoint_port::EndpointPort; mod endpoint_subset; -pub use self::endpoint_subset::{ - EndpointSubset, -}; +pub use self::endpoint_subset::EndpointSubset; mod endpoints; -pub use self::endpoints::{ - Endpoints, - CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse, - DeleteCollectionNamespacedEndpointsResponse, - DeleteNamespacedEndpointsResponse, - ListEndpointsForAllNamespacesResponse, - ListNamespacedEndpointsResponse, - PatchNamespacedEndpointsResponse, - ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse, - ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse, - WatchEndpointsForAllNamespacesResponse, - WatchNamespacedEndpointsResponse, -}; +pub use self::endpoints::Endpoints; +#[cfg(feature = "api")] pub use self::endpoints::{CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::DeleteCollectionNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::DeleteNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::PatchNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::{ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::{ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::WatchEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::WatchNamespacedEndpointsResponse; mod endpoints_list; -pub use self::endpoints_list::{ - EndpointsList, -}; +pub use self::endpoints_list::EndpointsList; mod env_from_source; -pub use self::env_from_source::{ - EnvFromSource, -}; +pub use self::env_from_source::EnvFromSource; mod env_var; -pub use self::env_var::{ - EnvVar, -}; +pub use self::env_var::EnvVar; mod env_var_source; -pub use self::env_var_source::{ - EnvVarSource, -}; +pub use self::env_var_source::EnvVarSource; mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_source; -pub use self::event_source::{ - EventSource, -}; +pub use self::event_source::EventSource; mod exec_action; -pub use self::exec_action::{ - ExecAction, -}; +pub use self::exec_action::ExecAction; mod fc_volume_source; -pub use self::fc_volume_source::{ - FCVolumeSource, -}; +pub use self::fc_volume_source::FCVolumeSource; mod flex_volume_source; -pub use self::flex_volume_source::{ - FlexVolumeSource, -}; +pub use self::flex_volume_source::FlexVolumeSource; mod flocker_volume_source; -pub use self::flocker_volume_source::{ - FlockerVolumeSource, -}; +pub use self::flocker_volume_source::FlockerVolumeSource; mod gce_persistent_disk_volume_source; -pub use self::gce_persistent_disk_volume_source::{ - GCEPersistentDiskVolumeSource, -}; +pub use self::gce_persistent_disk_volume_source::GCEPersistentDiskVolumeSource; mod git_repo_volume_source; -pub use self::git_repo_volume_source::{ - GitRepoVolumeSource, -}; +pub use self::git_repo_volume_source::GitRepoVolumeSource; mod glusterfs_volume_source; -pub use self::glusterfs_volume_source::{ - GlusterfsVolumeSource, -}; +pub use self::glusterfs_volume_source::GlusterfsVolumeSource; mod http_get_action; -pub use self::http_get_action::{ - HTTPGetAction, -}; +pub use self::http_get_action::HTTPGetAction; mod http_header; -pub use self::http_header::{ - HTTPHeader, -}; +pub use self::http_header::HTTPHeader; mod handler; -pub use self::handler::{ - Handler, -}; +pub use self::handler::Handler; mod host_alias; -pub use self::host_alias::{ - HostAlias, -}; +pub use self::host_alias::HostAlias; mod host_path_volume_source; -pub use self::host_path_volume_source::{ - HostPathVolumeSource, -}; +pub use self::host_path_volume_source::HostPathVolumeSource; mod iscsi_volume_source; -pub use self::iscsi_volume_source::{ - ISCSIVolumeSource, -}; +pub use self::iscsi_volume_source::ISCSIVolumeSource; mod key_to_path; -pub use self::key_to_path::{ - KeyToPath, -}; +pub use self::key_to_path::KeyToPath; mod lifecycle; -pub use self::lifecycle::{ - Lifecycle, -}; +pub use self::lifecycle::Lifecycle; mod limit_range; -pub use self::limit_range::{ - LimitRange, - CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse, - DeleteCollectionNamespacedLimitRangeResponse, - DeleteNamespacedLimitRangeResponse, - ListLimitRangeForAllNamespacesResponse, - ListNamespacedLimitRangeResponse, - PatchNamespacedLimitRangeResponse, - ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse, - ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse, - WatchLimitRangeForAllNamespacesResponse, - WatchNamespacedLimitRangeResponse, -}; +pub use self::limit_range::LimitRange; +#[cfg(feature = "api")] pub use self::limit_range::{CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::DeleteCollectionNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::DeleteNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::PatchNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::{ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::{ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::WatchLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::WatchNamespacedLimitRangeResponse; mod limit_range_item; -pub use self::limit_range_item::{ - LimitRangeItem, -}; +pub use self::limit_range_item::LimitRangeItem; mod limit_range_list; -pub use self::limit_range_list::{ - LimitRangeList, -}; +pub use self::limit_range_list::LimitRangeList; mod limit_range_spec; -pub use self::limit_range_spec::{ - LimitRangeSpec, -}; +pub use self::limit_range_spec::LimitRangeSpec; mod load_balancer_ingress; -pub use self::load_balancer_ingress::{ - LoadBalancerIngress, -}; +pub use self::load_balancer_ingress::LoadBalancerIngress; mod load_balancer_status; -pub use self::load_balancer_status::{ - LoadBalancerStatus, -}; +pub use self::load_balancer_status::LoadBalancerStatus; mod local_object_reference; -pub use self::local_object_reference::{ - LocalObjectReference, -}; +pub use self::local_object_reference::LocalObjectReference; mod local_volume_source; -pub use self::local_volume_source::{ - LocalVolumeSource, -}; +pub use self::local_volume_source::LocalVolumeSource; mod nfs_volume_source; -pub use self::nfs_volume_source::{ - NFSVolumeSource, -}; +pub use self::nfs_volume_source::NFSVolumeSource; mod namespace; -pub use self::namespace::{ - Namespace, - CreateNamespaceOptional, CreateNamespaceResponse, - DeleteNamespaceResponse, - ListNamespaceResponse, - PatchNamespaceResponse, - PatchNamespaceStatusResponse, - ReadNamespaceOptional, ReadNamespaceResponse, - ReadNamespaceStatusOptional, ReadNamespaceStatusResponse, - ReplaceNamespaceOptional, ReplaceNamespaceResponse, - ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse, - ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse, - WatchNamespaceResponse, -}; +pub use self::namespace::Namespace; +#[cfg(feature = "api")] pub use self::namespace::{CreateNamespaceOptional, CreateNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::DeleteNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::ListNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceStatusResponse; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceOptional, ReadNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceStatusOptional, ReadNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceOptional, ReplaceNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::WatchNamespaceResponse; mod namespace_list; -pub use self::namespace_list::{ - NamespaceList, -}; +pub use self::namespace_list::NamespaceList; mod namespace_spec; -pub use self::namespace_spec::{ - NamespaceSpec, -}; +pub use self::namespace_spec::NamespaceSpec; mod namespace_status; -pub use self::namespace_status::{ - NamespaceStatus, -}; +pub use self::namespace_status::NamespaceStatus; mod node; -pub use self::node::{ - Node, - ConnectDeleteNodeProxyOptional, - ConnectDeleteNodeProxyWithPathOptional, - ConnectGetNodeProxyOptional, - ConnectGetNodeProxyWithPathOptional, - ConnectPatchNodeProxyOptional, - ConnectPatchNodeProxyWithPathOptional, - ConnectPostNodeProxyOptional, - ConnectPostNodeProxyWithPathOptional, - ConnectPutNodeProxyOptional, - ConnectPutNodeProxyWithPathOptional, - CreateNodeOptional, CreateNodeResponse, - DeleteCollectionNodeResponse, - DeleteNodeResponse, - ListNodeResponse, - PatchNodeResponse, - PatchNodeStatusResponse, - ProxyDELETENodeResponse, - ProxyDELETENodeWithPathResponse, - ProxyGETNodeResponse, - ProxyGETNodeWithPathResponse, - ProxyPATCHNodeResponse, - ProxyPATCHNodeWithPathResponse, - ProxyPOSTNodeResponse, - ProxyPOSTNodeWithPathResponse, - ProxyPUTNodeResponse, - ProxyPUTNodeWithPathResponse, - ReadNodeOptional, ReadNodeResponse, - ReadNodeStatusOptional, ReadNodeStatusResponse, - ReplaceNodeOptional, ReplaceNodeResponse, - ReplaceNodeStatusOptional, ReplaceNodeStatusResponse, - WatchNodeResponse, -}; +pub use self::node::Node; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::{CreateNodeOptional, CreateNodeResponse}; +#[cfg(feature = "api")] pub use self::node::DeleteCollectionNodeResponse; +#[cfg(feature = "api")] pub use self::node::DeleteNodeResponse; +#[cfg(feature = "api")] pub use self::node::ListNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeStatusResponse; +#[cfg(feature = "api")] pub use self::node::ProxyDELETENodeResponse; +#[cfg(feature = "api")] pub use self::node::ProxyDELETENodeWithPathResponse; +#[cfg(feature = "api")] pub use self::node::ProxyGETNodeResponse; +#[cfg(feature = "api")] pub use self::node::ProxyGETNodeWithPathResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPATCHNodeResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPATCHNodeWithPathResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPOSTNodeResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPOSTNodeWithPathResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPUTNodeResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPUTNodeWithPathResponse; +#[cfg(feature = "api")] pub use self::node::{ReadNodeOptional, ReadNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReadNodeStatusOptional, ReadNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeOptional, ReplaceNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeStatusOptional, ReplaceNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::WatchNodeResponse; mod node_address; -pub use self::node_address::{ - NodeAddress, -}; +pub use self::node_address::NodeAddress; mod node_affinity; -pub use self::node_affinity::{ - NodeAffinity, -}; +pub use self::node_affinity::NodeAffinity; mod node_condition; -pub use self::node_condition::{ - NodeCondition, -}; +pub use self::node_condition::NodeCondition; mod node_config_source; -pub use self::node_config_source::{ - NodeConfigSource, -}; +pub use self::node_config_source::NodeConfigSource; mod node_daemon_endpoints; -pub use self::node_daemon_endpoints::{ - NodeDaemonEndpoints, -}; +pub use self::node_daemon_endpoints::NodeDaemonEndpoints; mod node_list; -pub use self::node_list::{ - NodeList, -}; +pub use self::node_list::NodeList; mod node_selector; -pub use self::node_selector::{ - NodeSelector, -}; +pub use self::node_selector::NodeSelector; mod node_selector_requirement; -pub use self::node_selector_requirement::{ - NodeSelectorRequirement, -}; +pub use self::node_selector_requirement::NodeSelectorRequirement; mod node_selector_term; -pub use self::node_selector_term::{ - NodeSelectorTerm, -}; +pub use self::node_selector_term::NodeSelectorTerm; mod node_spec; -pub use self::node_spec::{ - NodeSpec, -}; +pub use self::node_spec::NodeSpec; mod node_status; -pub use self::node_status::{ - NodeStatus, -}; +pub use self::node_status::NodeStatus; mod node_system_info; -pub use self::node_system_info::{ - NodeSystemInfo, -}; +pub use self::node_system_info::NodeSystemInfo; mod object_field_selector; -pub use self::object_field_selector::{ - ObjectFieldSelector, -}; +pub use self::object_field_selector::ObjectFieldSelector; mod object_reference; -pub use self::object_reference::{ - ObjectReference, -}; +pub use self::object_reference::ObjectReference; mod persistent_volume; -pub use self::persistent_volume::{ - PersistentVolume, - CreatePersistentVolumeOptional, CreatePersistentVolumeResponse, - DeleteCollectionPersistentVolumeResponse, - DeletePersistentVolumeResponse, - ListPersistentVolumeResponse, - PatchPersistentVolumeResponse, - PatchPersistentVolumeStatusResponse, - ReadPersistentVolumeOptional, ReadPersistentVolumeResponse, - ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse, - ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse, - ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse, - WatchPersistentVolumeResponse, -}; +pub use self::persistent_volume::PersistentVolume; +#[cfg(feature = "api")] pub use self::persistent_volume::{CreatePersistentVolumeOptional, CreatePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::DeleteCollectionPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::DeletePersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::ListPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeOptional, ReadPersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::WatchPersistentVolumeResponse; mod persistent_volume_claim; -pub use self::persistent_volume_claim::{ - PersistentVolumeClaim, - CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse, - DeleteCollectionNamespacedPersistentVolumeClaimResponse, - DeleteNamespacedPersistentVolumeClaimResponse, - ListNamespacedPersistentVolumeClaimResponse, - ListPersistentVolumeClaimForAllNamespacesResponse, - PatchNamespacedPersistentVolumeClaimResponse, - PatchNamespacedPersistentVolumeClaimStatusResponse, - ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse, - ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse, - ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse, - ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse, - WatchNamespacedPersistentVolumeClaimResponse, - WatchPersistentVolumeClaimForAllNamespacesResponse, -}; +pub use self::persistent_volume_claim::PersistentVolumeClaim; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteCollectionNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListPersistentVolumeClaimForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchPersistentVolumeClaimForAllNamespacesResponse; mod persistent_volume_claim_condition; -pub use self::persistent_volume_claim_condition::{ - PersistentVolumeClaimCondition, -}; +pub use self::persistent_volume_claim_condition::PersistentVolumeClaimCondition; mod persistent_volume_claim_list; -pub use self::persistent_volume_claim_list::{ - PersistentVolumeClaimList, -}; +pub use self::persistent_volume_claim_list::PersistentVolumeClaimList; mod persistent_volume_claim_spec; -pub use self::persistent_volume_claim_spec::{ - PersistentVolumeClaimSpec, -}; +pub use self::persistent_volume_claim_spec::PersistentVolumeClaimSpec; mod persistent_volume_claim_status; -pub use self::persistent_volume_claim_status::{ - PersistentVolumeClaimStatus, -}; +pub use self::persistent_volume_claim_status::PersistentVolumeClaimStatus; mod persistent_volume_claim_volume_source; -pub use self::persistent_volume_claim_volume_source::{ - PersistentVolumeClaimVolumeSource, -}; +pub use self::persistent_volume_claim_volume_source::PersistentVolumeClaimVolumeSource; mod persistent_volume_list; -pub use self::persistent_volume_list::{ - PersistentVolumeList, -}; +pub use self::persistent_volume_list::PersistentVolumeList; mod persistent_volume_spec; -pub use self::persistent_volume_spec::{ - PersistentVolumeSpec, -}; +pub use self::persistent_volume_spec::PersistentVolumeSpec; mod persistent_volume_status; -pub use self::persistent_volume_status::{ - PersistentVolumeStatus, -}; +pub use self::persistent_volume_status::PersistentVolumeStatus; mod photon_persistent_disk_volume_source; -pub use self::photon_persistent_disk_volume_source::{ - PhotonPersistentDiskVolumeSource, -}; +pub use self::photon_persistent_disk_volume_source::PhotonPersistentDiskVolumeSource; mod pod; -pub use self::pod::{ - Pod, - ConnectDeleteNamespacedPodProxyOptional, - ConnectDeleteNamespacedPodProxyWithPathOptional, - ConnectGetNamespacedPodAttachOptional, - ConnectGetNamespacedPodExecOptional, - ConnectGetNamespacedPodPortforwardOptional, - ConnectGetNamespacedPodProxyOptional, - ConnectGetNamespacedPodProxyWithPathOptional, - ConnectPatchNamespacedPodProxyOptional, - ConnectPatchNamespacedPodProxyWithPathOptional, - ConnectPostNamespacedPodAttachOptional, - ConnectPostNamespacedPodExecOptional, - ConnectPostNamespacedPodPortforwardOptional, - ConnectPostNamespacedPodProxyOptional, - ConnectPostNamespacedPodProxyWithPathOptional, - ConnectPutNamespacedPodProxyOptional, - ConnectPutNamespacedPodProxyWithPathOptional, - CreateNamespacedPodOptional, CreateNamespacedPodResponse, - DeleteCollectionNamespacedPodResponse, - DeleteNamespacedPodResponse, - ListNamespacedPodResponse, - ListPodForAllNamespacesResponse, - PatchNamespacedPodResponse, - PatchNamespacedPodStatusResponse, - ProxyDELETENamespacedPodResponse, - ProxyDELETENamespacedPodWithPathResponse, - ProxyGETNamespacedPodResponse, - ProxyGETNamespacedPodWithPathResponse, - ProxyPATCHNamespacedPodResponse, - ProxyPATCHNamespacedPodWithPathResponse, - ProxyPOSTNamespacedPodResponse, - ProxyPOSTNamespacedPodWithPathResponse, - ProxyPUTNamespacedPodResponse, - ProxyPUTNamespacedPodWithPathResponse, - ReadNamespacedPodOptional, ReadNamespacedPodResponse, - ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse, - ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse, - ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse, - ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse, - WatchNamespacedPodResponse, - WatchPodForAllNamespacesResponse, -}; +pub use self::pod::Pod; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::{CreateNamespacedPodOptional, CreateNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::DeleteCollectionNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::DeleteNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListPodForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodStatusResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyDELETENamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyDELETENamespacedPodWithPathResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyGETNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyGETNamespacedPodWithPathResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPATCHNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPATCHNamespacedPodWithPathResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPOSTNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPOSTNamespacedPodWithPathResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPUTNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPUTNamespacedPodWithPathResponse; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodOptional, ReadNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::WatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::WatchPodForAllNamespacesResponse; mod pod_affinity; -pub use self::pod_affinity::{ - PodAffinity, -}; +pub use self::pod_affinity::PodAffinity; mod pod_affinity_term; -pub use self::pod_affinity_term::{ - PodAffinityTerm, -}; +pub use self::pod_affinity_term::PodAffinityTerm; mod pod_anti_affinity; -pub use self::pod_anti_affinity::{ - PodAntiAffinity, -}; +pub use self::pod_anti_affinity::PodAntiAffinity; mod pod_condition; -pub use self::pod_condition::{ - PodCondition, -}; +pub use self::pod_condition::PodCondition; mod pod_list; -pub use self::pod_list::{ - PodList, -}; +pub use self::pod_list::PodList; mod pod_security_context; -pub use self::pod_security_context::{ - PodSecurityContext, -}; +pub use self::pod_security_context::PodSecurityContext; mod pod_spec; -pub use self::pod_spec::{ - PodSpec, -}; +pub use self::pod_spec::PodSpec; mod pod_status; -pub use self::pod_status::{ - PodStatus, -}; +pub use self::pod_status::PodStatus; mod pod_template; -pub use self::pod_template::{ - PodTemplate, - CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse, - DeleteCollectionNamespacedPodTemplateResponse, - DeleteNamespacedPodTemplateResponse, - ListNamespacedPodTemplateResponse, - ListPodTemplateForAllNamespacesResponse, - PatchNamespacedPodTemplateResponse, - ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse, - ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse, - WatchNamespacedPodTemplateResponse, - WatchPodTemplateForAllNamespacesResponse, -}; +pub use self::pod_template::PodTemplate; +#[cfg(feature = "api")] pub use self::pod_template::{CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::DeleteCollectionNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::DeleteNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListPodTemplateForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_template::PatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::{ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::{ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::WatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::WatchPodTemplateForAllNamespacesResponse; mod pod_template_list; -pub use self::pod_template_list::{ - PodTemplateList, -}; +pub use self::pod_template_list::PodTemplateList; mod pod_template_spec; -pub use self::pod_template_spec::{ - PodTemplateSpec, -}; +pub use self::pod_template_spec::PodTemplateSpec; mod portworx_volume_source; -pub use self::portworx_volume_source::{ - PortworxVolumeSource, -}; +pub use self::portworx_volume_source::PortworxVolumeSource; mod preferred_scheduling_term; -pub use self::preferred_scheduling_term::{ - PreferredSchedulingTerm, -}; +pub use self::preferred_scheduling_term::PreferredSchedulingTerm; mod probe; -pub use self::probe::{ - Probe, -}; +pub use self::probe::Probe; mod projected_volume_source; -pub use self::projected_volume_source::{ - ProjectedVolumeSource, -}; +pub use self::projected_volume_source::ProjectedVolumeSource; mod quobyte_volume_source; -pub use self::quobyte_volume_source::{ - QuobyteVolumeSource, -}; +pub use self::quobyte_volume_source::QuobyteVolumeSource; mod rbd_volume_source; -pub use self::rbd_volume_source::{ - RBDVolumeSource, -}; +pub use self::rbd_volume_source::RBDVolumeSource; mod replication_controller; -pub use self::replication_controller::{ - ReplicationController, - CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse, - DeleteCollectionNamespacedReplicationControllerResponse, - DeleteNamespacedReplicationControllerResponse, - ListNamespacedReplicationControllerResponse, - ListReplicationControllerForAllNamespacesResponse, - PatchNamespacedReplicationControllerResponse, - PatchNamespacedReplicationControllerStatusResponse, - ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse, - ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse, - ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse, - ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse, - WatchNamespacedReplicationControllerResponse, - WatchReplicationControllerForAllNamespacesResponse, -}; +pub use self::replication_controller::ReplicationController; +#[cfg(feature = "api")] pub use self::replication_controller::{CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteCollectionNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListReplicationControllerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerStatusResponse; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::WatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::WatchReplicationControllerForAllNamespacesResponse; mod replication_controller_condition; -pub use self::replication_controller_condition::{ - ReplicationControllerCondition, -}; +pub use self::replication_controller_condition::ReplicationControllerCondition; mod replication_controller_list; -pub use self::replication_controller_list::{ - ReplicationControllerList, -}; +pub use self::replication_controller_list::ReplicationControllerList; mod replication_controller_spec; -pub use self::replication_controller_spec::{ - ReplicationControllerSpec, -}; +pub use self::replication_controller_spec::ReplicationControllerSpec; mod replication_controller_status; -pub use self::replication_controller_status::{ - ReplicationControllerStatus, -}; +pub use self::replication_controller_status::ReplicationControllerStatus; mod resource_field_selector; -pub use self::resource_field_selector::{ - ResourceFieldSelector, -}; +pub use self::resource_field_selector::ResourceFieldSelector; mod resource_quota; -pub use self::resource_quota::{ - ResourceQuota, - CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse, - DeleteCollectionNamespacedResourceQuotaResponse, - DeleteNamespacedResourceQuotaResponse, - ListNamespacedResourceQuotaResponse, - ListResourceQuotaForAllNamespacesResponse, - PatchNamespacedResourceQuotaResponse, - PatchNamespacedResourceQuotaStatusResponse, - ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse, - ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse, - ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse, - ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse, - WatchNamespacedResourceQuotaResponse, - WatchResourceQuotaForAllNamespacesResponse, -}; +pub use self::resource_quota::ResourceQuota; +#[cfg(feature = "api")] pub use self::resource_quota::{CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteCollectionNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListResourceQuotaForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaStatusResponse; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::WatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::WatchResourceQuotaForAllNamespacesResponse; mod resource_quota_list; -pub use self::resource_quota_list::{ - ResourceQuotaList, -}; +pub use self::resource_quota_list::ResourceQuotaList; mod resource_quota_spec; -pub use self::resource_quota_spec::{ - ResourceQuotaSpec, -}; +pub use self::resource_quota_spec::ResourceQuotaSpec; mod resource_quota_status; -pub use self::resource_quota_status::{ - ResourceQuotaStatus, -}; +pub use self::resource_quota_status::ResourceQuotaStatus; mod resource_requirements; -pub use self::resource_requirements::{ - ResourceRequirements, -}; +pub use self::resource_requirements::ResourceRequirements; mod se_linux_options; -pub use self::se_linux_options::{ - SELinuxOptions, -}; +pub use self::se_linux_options::SELinuxOptions; mod scale_io_persistent_volume_source; -pub use self::scale_io_persistent_volume_source::{ - ScaleIOPersistentVolumeSource, -}; +pub use self::scale_io_persistent_volume_source::ScaleIOPersistentVolumeSource; mod scale_io_volume_source; -pub use self::scale_io_volume_source::{ - ScaleIOVolumeSource, -}; +pub use self::scale_io_volume_source::ScaleIOVolumeSource; mod secret; -pub use self::secret::{ - Secret, - CreateNamespacedSecretOptional, CreateNamespacedSecretResponse, - DeleteCollectionNamespacedSecretResponse, - DeleteNamespacedSecretResponse, - ListNamespacedSecretResponse, - ListSecretForAllNamespacesResponse, - PatchNamespacedSecretResponse, - ReadNamespacedSecretOptional, ReadNamespacedSecretResponse, - ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse, - WatchNamespacedSecretResponse, - WatchSecretForAllNamespacesResponse, -}; +pub use self::secret::Secret; +#[cfg(feature = "api")] pub use self::secret::{CreateNamespacedSecretOptional, CreateNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::DeleteCollectionNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::DeleteNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListSecretForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::secret::PatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::{ReadNamespacedSecretOptional, ReadNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::{ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::WatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::WatchSecretForAllNamespacesResponse; mod secret_env_source; -pub use self::secret_env_source::{ - SecretEnvSource, -}; +pub use self::secret_env_source::SecretEnvSource; mod secret_key_selector; -pub use self::secret_key_selector::{ - SecretKeySelector, -}; +pub use self::secret_key_selector::SecretKeySelector; mod secret_list; -pub use self::secret_list::{ - SecretList, -}; +pub use self::secret_list::SecretList; mod secret_projection; -pub use self::secret_projection::{ - SecretProjection, -}; +pub use self::secret_projection::SecretProjection; mod secret_reference; -pub use self::secret_reference::{ - SecretReference, -}; +pub use self::secret_reference::SecretReference; mod secret_volume_source; -pub use self::secret_volume_source::{ - SecretVolumeSource, -}; +pub use self::secret_volume_source::SecretVolumeSource; mod security_context; -pub use self::security_context::{ - SecurityContext, -}; +pub use self::security_context::SecurityContext; mod service; -pub use self::service::{ - Service, - ConnectDeleteNamespacedServiceProxyOptional, - ConnectDeleteNamespacedServiceProxyWithPathOptional, - ConnectGetNamespacedServiceProxyOptional, - ConnectGetNamespacedServiceProxyWithPathOptional, - ConnectPatchNamespacedServiceProxyOptional, - ConnectPatchNamespacedServiceProxyWithPathOptional, - ConnectPostNamespacedServiceProxyOptional, - ConnectPostNamespacedServiceProxyWithPathOptional, - ConnectPutNamespacedServiceProxyOptional, - ConnectPutNamespacedServiceProxyWithPathOptional, - CreateNamespacedServiceOptional, CreateNamespacedServiceResponse, - DeleteNamespacedServiceOptional, DeleteNamespacedServiceResponse, - ListNamespacedServiceResponse, - ListServiceForAllNamespacesResponse, - PatchNamespacedServiceResponse, - PatchNamespacedServiceStatusResponse, - ProxyDELETENamespacedServiceResponse, - ProxyDELETENamespacedServiceWithPathResponse, - ProxyGETNamespacedServiceResponse, - ProxyGETNamespacedServiceWithPathResponse, - ProxyPATCHNamespacedServiceResponse, - ProxyPATCHNamespacedServiceWithPathResponse, - ProxyPOSTNamespacedServiceResponse, - ProxyPOSTNamespacedServiceWithPathResponse, - ProxyPUTNamespacedServiceResponse, - ProxyPUTNamespacedServiceWithPathResponse, - ReadNamespacedServiceOptional, ReadNamespacedServiceResponse, - ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse, - ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse, - ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse, - WatchNamespacedServiceResponse, - WatchServiceForAllNamespacesResponse, -}; +pub use self::service::Service; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::{CreateNamespacedServiceOptional, CreateNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{DeleteNamespacedServiceOptional, DeleteNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::ListNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListServiceForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceStatusResponse; +#[cfg(feature = "api")] pub use self::service::ProxyDELETENamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ProxyDELETENamespacedServiceWithPathResponse; +#[cfg(feature = "api")] pub use self::service::ProxyGETNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ProxyGETNamespacedServiceWithPathResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPATCHNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPATCHNamespacedServiceWithPathResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPOSTNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPOSTNamespacedServiceWithPathResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPUTNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPUTNamespacedServiceWithPathResponse; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceOptional, ReadNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::WatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::WatchServiceForAllNamespacesResponse; mod service_account; -pub use self::service_account::{ - ServiceAccount, - CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse, - DeleteCollectionNamespacedServiceAccountResponse, - DeleteNamespacedServiceAccountResponse, - ListNamespacedServiceAccountResponse, - ListServiceAccountForAllNamespacesResponse, - PatchNamespacedServiceAccountResponse, - ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse, - ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse, - WatchNamespacedServiceAccountResponse, - WatchServiceAccountForAllNamespacesResponse, -}; +pub use self::service_account::ServiceAccount; +#[cfg(feature = "api")] pub use self::service_account::{CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::DeleteCollectionNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::DeleteNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListServiceAccountForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service_account::PatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::{ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::{ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::WatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::WatchServiceAccountForAllNamespacesResponse; mod service_account_list; -pub use self::service_account_list::{ - ServiceAccountList, -}; +pub use self::service_account_list::ServiceAccountList; mod service_list; -pub use self::service_list::{ - ServiceList, -}; +pub use self::service_list::ServiceList; mod service_port; -pub use self::service_port::{ - ServicePort, -}; +pub use self::service_port::ServicePort; mod service_spec; -pub use self::service_spec::{ - ServiceSpec, -}; +pub use self::service_spec::ServiceSpec; mod service_status; -pub use self::service_status::{ - ServiceStatus, -}; +pub use self::service_status::ServiceStatus; mod session_affinity_config; -pub use self::session_affinity_config::{ - SessionAffinityConfig, -}; +pub use self::session_affinity_config::SessionAffinityConfig; mod storage_os_persistent_volume_source; -pub use self::storage_os_persistent_volume_source::{ - StorageOSPersistentVolumeSource, -}; +pub use self::storage_os_persistent_volume_source::StorageOSPersistentVolumeSource; mod storage_os_volume_source; -pub use self::storage_os_volume_source::{ - StorageOSVolumeSource, -}; +pub use self::storage_os_volume_source::StorageOSVolumeSource; mod tcp_socket_action; -pub use self::tcp_socket_action::{ - TCPSocketAction, -}; +pub use self::tcp_socket_action::TCPSocketAction; mod taint; -pub use self::taint::{ - Taint, -}; +pub use self::taint::Taint; mod toleration; -pub use self::toleration::{ - Toleration, -}; +pub use self::toleration::Toleration; mod volume; -pub use self::volume::{ - Volume, -}; +pub use self::volume::Volume; mod volume_mount; -pub use self::volume_mount::{ - VolumeMount, -}; +pub use self::volume_mount::VolumeMount; mod volume_projection; -pub use self::volume_projection::{ - VolumeProjection, -}; +pub use self::volume_projection::VolumeProjection; mod vsphere_virtual_disk_volume_source; -pub use self::vsphere_virtual_disk_volume_source::{ - VsphereVirtualDiskVolumeSource, -}; +pub use self::vsphere_virtual_disk_volume_source::VsphereVirtualDiskVolumeSource; mod weighted_pod_affinity_term; -pub use self::weighted_pod_affinity_term::{ - WeightedPodAffinityTerm, -}; +pub use self::weighted_pod_affinity_term::WeightedPodAffinityTerm; diff --git a/src/v1_8/api/core/v1/namespace.rs b/src/v1_8/api/core/v1/namespace.rs index a5221147e9..dd705fff3f 100644 --- a/src/v1_8/api/core/v1/namespace.rs +++ b/src/v1_8/api/core/v1/namespace.rs @@ -29,6 +29,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespace( body: &crate::v1_8::api::core::v1::Namespace, optional: CreateNamespaceOptional<'_>, @@ -54,6 +55,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespaceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,12 +63,14 @@ pub struct CreateNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespaceResponse { Ok(crate::v1_8::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -112,6 +116,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespace( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -131,6 +136,7 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::delete_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespaceResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -138,6 +144,7 @@ pub enum DeleteNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -194,6 +201,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespace( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -212,12 +220,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::list_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespaceResponse { Ok(crate::v1_8::api::core::v1::NamespaceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -265,6 +275,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -292,12 +303,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceResponse { Ok(crate::v1_8::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -345,6 +358,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace_status( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -372,12 +386,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceStatusResponse { Ok(crate::v1_8::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -423,6 +439,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace( name: &str, optional: ReadNamespaceOptional<'_>, @@ -457,6 +474,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -468,12 +486,14 @@ pub struct ReadNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceResponse { Ok(crate::v1_8::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -519,6 +539,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace_status( name: &str, optional: ReadNamespaceStatusOptional<'_>, @@ -545,6 +566,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -552,12 +574,14 @@ pub struct ReadNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceStatusResponse { Ok(crate::v1_8::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -605,6 +629,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace( name: &str, body: &crate::v1_8::api::core::v1::Namespace, @@ -633,6 +658,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -640,12 +666,14 @@ pub struct ReplaceNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceResponse { Ok(crate::v1_8::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -693,6 +721,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_finalize( name: &str, body: &crate::v1_8::api::core::v1::Namespace, @@ -721,6 +750,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceFinalizeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -728,12 +758,14 @@ pub struct ReplaceNamespaceFinalizeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceFinalizeResponse { Ok(crate::v1_8::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceFinalizeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -781,6 +813,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_status( name: &str, body: &crate::v1_8::api::core::v1::Namespace, @@ -809,6 +842,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -816,12 +850,14 @@ pub struct ReplaceNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceStatusResponse { Ok(crate::v1_8::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -865,6 +901,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespace( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -883,12 +920,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::watch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespaceResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/node.rs b/src/v1_8/api/core/v1/node.rs index ecf273624f..deda513a87 100644 --- a/src/v1_8/api/core/v1/node.rs +++ b/src/v1_8/api/core/v1/node.rs @@ -29,6 +29,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy( name: &str, optional: ConnectDeleteNodeProxyOptional<'_>, @@ -52,6 +53,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -76,6 +78,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy_with_path( name: &str, path: &str, @@ -101,6 +104,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -121,6 +125,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy( name: &str, optional: ConnectGetNodeProxyOptional<'_>, @@ -144,6 +149,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -168,6 +174,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy_with_path( name: &str, path: &str, @@ -193,6 +200,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -213,6 +221,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy( name: &str, optional: ConnectPatchNodeProxyOptional<'_>, @@ -236,6 +245,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -260,6 +270,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy_with_path( name: &str, path: &str, @@ -285,6 +296,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -305,6 +317,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy( name: &str, optional: ConnectPostNodeProxyOptional<'_>, @@ -328,6 +341,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -352,6 +366,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy_with_path( name: &str, path: &str, @@ -377,6 +392,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -397,6 +413,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy( name: &str, optional: ConnectPutNodeProxyOptional<'_>, @@ -420,6 +437,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -444,6 +462,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy_with_path( name: &str, path: &str, @@ -469,6 +488,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -489,6 +509,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_node( body: &crate::v1_8::api::core::v1::Node, optional: CreateNodeOptional<'_>, @@ -514,6 +535,7 @@ impl Node { } /// Optional parameters of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNodeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -521,12 +543,14 @@ pub struct CreateNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNodeResponse { Ok(crate::v1_8::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -572,6 +596,7 @@ impl Node { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_node( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -592,6 +617,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_collection_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNodeResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -599,6 +625,7 @@ pub enum DeleteCollectionNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +684,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_node( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -676,6 +704,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNodeResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -683,6 +712,7 @@ pub enum DeleteNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -739,6 +769,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_node( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -757,12 +788,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::list_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNodeResponse { Ok(crate::v1_8::api::core::v1::NodeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -810,6 +843,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -837,12 +871,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeResponse { Ok(crate::v1_8::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -890,6 +926,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node_status( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -917,12 +954,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeStatusResponse { Ok(crate::v1_8::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -964,6 +1003,7 @@ impl Node { /// * `name` /// /// name of the Node + #[cfg(feature = "api")] pub fn proxy_delete_node( name: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -981,12 +1021,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_delete_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENodeResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1042,6 +1084,7 @@ impl Node { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_delete_node_with_path( name: &str, path: &str, @@ -1061,12 +1104,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_delete_node_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENodeWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENodeWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1118,6 +1163,7 @@ impl Node { /// * `name` /// /// name of the Node + #[cfg(feature = "api")] pub fn proxy_get_node( name: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1135,12 +1181,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_get_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNodeResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1196,6 +1244,7 @@ impl Node { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_get_node_with_path( name: &str, path: &str, @@ -1215,12 +1264,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_get_node_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNodeWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNodeWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1272,6 +1323,7 @@ impl Node { /// * `name` /// /// name of the Node + #[cfg(feature = "api")] pub fn proxy_patch_node( name: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1289,12 +1341,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_patch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNodeResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1350,6 +1404,7 @@ impl Node { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_patch_node_with_path( name: &str, path: &str, @@ -1369,12 +1424,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_patch_node_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNodeWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNodeWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1426,6 +1483,7 @@ impl Node { /// * `name` /// /// name of the Node + #[cfg(feature = "api")] pub fn proxy_post_node( name: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1443,12 +1501,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_post_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNodeResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1504,6 +1564,7 @@ impl Node { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_post_node_with_path( name: &str, path: &str, @@ -1523,12 +1584,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_post_node_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNodeWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNodeWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1580,6 +1643,7 @@ impl Node { /// * `name` /// /// name of the Node + #[cfg(feature = "api")] pub fn proxy_put_node( name: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1597,12 +1661,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_put_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNodeResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1658,6 +1724,7 @@ impl Node { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_put_node_with_path( name: &str, path: &str, @@ -1677,12 +1744,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_put_node_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNodeWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNodeWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1738,6 +1807,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node( name: &str, optional: ReadNodeOptional<'_>, @@ -1772,6 +1842,7 @@ impl Node { } /// Optional parameters of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1783,12 +1854,14 @@ pub struct ReadNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeResponse { Ok(crate::v1_8::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1834,6 +1907,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node_status( name: &str, optional: ReadNodeStatusOptional<'_>, @@ -1860,6 +1934,7 @@ impl Node { } /// Optional parameters of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1867,12 +1942,14 @@ pub struct ReadNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeStatusResponse { Ok(crate::v1_8::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1920,6 +1997,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node( name: &str, body: &crate::v1_8::api::core::v1::Node, @@ -1948,6 +2026,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1955,12 +2034,14 @@ pub struct ReplaceNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeResponse { Ok(crate::v1_8::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2008,6 +2089,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node_status( name: &str, body: &crate::v1_8::api::core::v1::Node, @@ -2036,6 +2118,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2043,12 +2126,14 @@ pub struct ReplaceNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeStatusResponse { Ok(crate::v1_8::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2092,6 +2177,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_node( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2110,12 +2196,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::watch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNodeResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/persistent_volume.rs b/src/v1_8/api/core/v1/persistent_volume.rs index 899d65d92a..c82cea1279 100644 --- a/src/v1_8/api/core/v1/persistent_volume.rs +++ b/src/v1_8/api/core/v1/persistent_volume.rs @@ -29,6 +29,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_persistent_volume( body: &crate::v1_8::api::core::v1::PersistentVolume, optional: CreatePersistentVolumeOptional<'_>, @@ -54,6 +55,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePersistentVolumeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,12 +63,14 @@ pub struct CreatePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePersistentVolumeResponse { Ok(crate::v1_8::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -112,6 +116,7 @@ impl PersistentVolume { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_persistent_volume( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -132,6 +137,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_collection_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPersistentVolumeResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -139,6 +145,7 @@ pub enum DeleteCollectionPersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -197,6 +204,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_persistent_volume( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -216,6 +224,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePersistentVolumeResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -223,6 +232,7 @@ pub enum DeletePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -279,6 +289,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -297,12 +308,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::list_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeResponse { Ok(crate::v1_8::api::core::v1::PersistentVolumeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +363,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -377,12 +391,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeResponse { Ok(crate::v1_8::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -430,6 +446,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume_status( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -457,12 +474,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeStatusResponse { Ok(crate::v1_8::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -508,6 +527,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume( name: &str, optional: ReadPersistentVolumeOptional<'_>, @@ -542,6 +562,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -553,12 +574,14 @@ pub struct ReadPersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeResponse { Ok(crate::v1_8::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -604,6 +627,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume_status( name: &str, optional: ReadPersistentVolumeStatusOptional<'_>, @@ -630,6 +654,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -637,12 +662,14 @@ pub struct ReadPersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeStatusResponse { Ok(crate::v1_8::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -690,6 +717,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume( name: &str, body: &crate::v1_8::api::core::v1::PersistentVolume, @@ -718,6 +746,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -725,12 +754,14 @@ pub struct ReplacePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeResponse { Ok(crate::v1_8::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -778,6 +809,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume_status( name: &str, body: &crate::v1_8::api::core::v1::PersistentVolume, @@ -806,6 +838,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -813,12 +846,14 @@ pub struct ReplacePersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeStatusResponse { Ok(crate::v1_8::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -862,6 +897,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -880,12 +916,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::watch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/persistent_volume_claim.rs b/src/v1_8/api/core/v1/persistent_volume_claim.rs index f26d3e7136..5c1b621f59 100644 --- a/src/v1_8/api/core/v1/persistent_volume_claim.rs +++ b/src/v1_8/api/core/v1/persistent_volume_claim.rs @@ -33,6 +33,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_persistent_volume_claim( namespace: &str, body: &crate::v1_8::api::core::v1::PersistentVolumeClaim, @@ -61,6 +62,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_8::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl PersistentVolumeClaim { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_persistent_volume_claim( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_collection_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -303,6 +313,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -324,12 +335,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_8::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +386,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume_claim_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +405,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_8::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_8::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_8::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_8::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_8::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_8::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -996,6 +1034,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1017,12 +1056,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1068,6 +1109,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume_claim_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1086,12 +1128,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/pod.rs b/src/v1_8/api/core/v1/pod.rs index e5e0b6a9c7..a40b6236ef 100644 --- a/src/v1_8/api/core/v1/pod.rs +++ b/src/v1_8/api/core/v1/pod.rs @@ -33,6 +33,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -86,6 +88,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -137,6 +141,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_attach( name: &str, namespace: &str, @@ -178,6 +183,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -210,6 +216,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_exec( name: &str, namespace: &str, @@ -255,6 +262,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -289,6 +297,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_portforward( name: &str, namespace: &str, @@ -314,6 +323,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -338,6 +348,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy( name: &str, namespace: &str, @@ -363,6 +374,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -391,6 +403,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -418,6 +431,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -442,6 +456,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy( name: &str, namespace: &str, @@ -467,6 +482,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -495,6 +511,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -522,6 +539,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -546,6 +564,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_attach( name: &str, namespace: &str, @@ -587,6 +606,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -619,6 +639,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_exec( name: &str, namespace: &str, @@ -664,6 +685,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -698,6 +720,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_portforward( name: &str, namespace: &str, @@ -723,6 +746,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -747,6 +771,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy( name: &str, namespace: &str, @@ -772,6 +797,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -800,6 +826,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -827,6 +854,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -851,6 +879,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy( name: &str, namespace: &str, @@ -876,6 +905,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -904,6 +934,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -931,6 +962,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -955,6 +987,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod( namespace: &str, body: &crate::v1_8::api::core::v1::Pod, @@ -983,6 +1016,7 @@ impl Pod { } /// Optional parameters of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodOptional<'a> { /// If 'true', then the output is pretty printed. @@ -990,12 +1024,14 @@ pub struct CreateNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodResponse { Ok(crate::v1_8::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1045,6 +1081,7 @@ impl Pod { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -1068,6 +1105,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_collection_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -1075,6 +1113,7 @@ pub enum DeleteCollectionNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1137,6 +1176,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod( name: &str, namespace: &str, @@ -1158,6 +1198,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -1165,6 +1206,7 @@ pub enum DeleteNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1225,6 +1267,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -1246,12 +1289,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodResponse { Ok(crate::v1_8::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1295,6 +1340,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1313,12 +1359,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1370,6 +1418,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod( name: &str, namespace: &str, @@ -1399,12 +1448,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodResponse { Ok(crate::v1_8::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1456,6 +1507,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_status( name: &str, namespace: &str, @@ -1485,12 +1537,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodStatusResponse { Ok(crate::v1_8::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1536,6 +1590,7 @@ impl Pod { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_delete_namespaced_pod( name: &str, namespace: &str, @@ -1555,12 +1610,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_delete_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENamespacedPodResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1620,6 +1677,7 @@ impl Pod { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_delete_namespaced_pod_with_path( name: &str, namespace: &str, @@ -1641,12 +1699,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_delete_namespaced_pod_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENamespacedPodWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENamespacedPodWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1702,6 +1762,7 @@ impl Pod { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_get_namespaced_pod( name: &str, namespace: &str, @@ -1721,12 +1782,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_get_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNamespacedPodResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1786,6 +1849,7 @@ impl Pod { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_get_namespaced_pod_with_path( name: &str, namespace: &str, @@ -1807,12 +1871,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_get_namespaced_pod_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNamespacedPodWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNamespacedPodWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1868,6 +1934,7 @@ impl Pod { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_patch_namespaced_pod( name: &str, namespace: &str, @@ -1887,12 +1954,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_patch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNamespacedPodResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1952,6 +2021,7 @@ impl Pod { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_patch_namespaced_pod_with_path( name: &str, namespace: &str, @@ -1973,12 +2043,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_patch_namespaced_pod_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNamespacedPodWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNamespacedPodWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2034,6 +2106,7 @@ impl Pod { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_post_namespaced_pod( name: &str, namespace: &str, @@ -2053,12 +2126,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_post_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNamespacedPodResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2118,6 +2193,7 @@ impl Pod { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_post_namespaced_pod_with_path( name: &str, namespace: &str, @@ -2139,12 +2215,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_post_namespaced_pod_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNamespacedPodWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNamespacedPodWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2200,6 +2278,7 @@ impl Pod { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_put_namespaced_pod( name: &str, namespace: &str, @@ -2219,12 +2298,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_put_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNamespacedPodResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2284,6 +2365,7 @@ impl Pod { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_put_namespaced_pod_with_path( name: &str, namespace: &str, @@ -2305,12 +2387,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_put_namespaced_pod_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNamespacedPodWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNamespacedPodWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2370,6 +2454,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod( name: &str, namespace: &str, @@ -2406,6 +2491,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -2417,12 +2503,14 @@ pub struct ReadNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodResponse { Ok(crate::v1_8::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2472,6 +2560,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_log( name: &str, namespace: &str, @@ -2528,6 +2617,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodLogOptional<'a> { /// The container for which to stream logs. Defaults to only container if there is one container in the pod. @@ -2549,12 +2639,14 @@ pub struct ReadNamespacedPodLogOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodLogResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodLogResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2614,6 +2706,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_status( name: &str, namespace: &str, @@ -2642,6 +2735,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2649,12 +2743,14 @@ pub struct ReadNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodStatusResponse { Ok(crate::v1_8::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2706,6 +2802,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod( name: &str, namespace: &str, @@ -2736,6 +2833,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2743,12 +2841,14 @@ pub struct ReplaceNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodResponse { Ok(crate::v1_8::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2800,6 +2900,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_status( name: &str, namespace: &str, @@ -2830,6 +2931,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2837,12 +2939,14 @@ pub struct ReplaceNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodStatusResponse { Ok(crate::v1_8::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2890,6 +2994,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -2911,12 +3016,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2962,6 +3069,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2980,12 +3088,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/pod_template.rs b/src/v1_8/api/core/v1/pod_template.rs index b423391291..6da45bbd29 100644 --- a/src/v1_8/api/core/v1/pod_template.rs +++ b/src/v1_8/api/core/v1/pod_template.rs @@ -30,6 +30,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_template( namespace: &str, body: &crate::v1_8::api::core::v1::PodTemplate, @@ -58,6 +59,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodTemplateOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,12 +67,14 @@ pub struct CreateNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodTemplateResponse { Ok(crate::v1_8::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -120,6 +124,7 @@ impl PodTemplate { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_template( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -143,6 +148,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_collection_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodTemplateResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -150,6 +156,7 @@ pub enum DeleteCollectionNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_template( name: &str, namespace: &str, @@ -233,6 +241,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodTemplateResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -300,6 +310,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_template( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -321,12 +332,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodTemplateResponse { Ok(crate::v1_8::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_template_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -388,12 +402,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodTemplateForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_template( name: &str, namespace: &str, @@ -474,12 +491,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::patch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodTemplateResponse { Ok(crate::v1_8::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -529,6 +548,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_template( name: &str, namespace: &str, @@ -565,6 +585,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodTemplateOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -576,12 +597,14 @@ pub struct ReadNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodTemplateResponse { Ok(crate::v1_8::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -633,6 +656,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_template( name: &str, namespace: &str, @@ -663,6 +687,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodTemplateOptional<'a> { /// If 'true', then the output is pretty printed. @@ -670,12 +695,14 @@ pub struct ReplaceNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodTemplateResponse { Ok(crate::v1_8::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -723,6 +750,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_template( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -744,12 +772,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodTemplateResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -795,6 +825,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_template_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -813,12 +844,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodTemplateForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/replication_controller.rs b/src/v1_8/api/core/v1/replication_controller.rs index 0383091930..01459015b8 100644 --- a/src/v1_8/api/core/v1/replication_controller.rs +++ b/src/v1_8/api/core/v1/replication_controller.rs @@ -33,6 +33,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replication_controller( namespace: &str, body: &crate::v1_8::api::core::v1::ReplicationController, @@ -61,6 +62,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicationControllerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicationControllerResponse { Ok(crate::v1_8::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl ReplicationController { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replication_controller( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_collection_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicationControllerResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replication_controller( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicationControllerResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -303,6 +313,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replication_controller( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -324,12 +335,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicationControllerResponse { Ok(crate::v1_8::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +386,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replication_controller_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +405,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicationControllerForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerResponse { Ok(crate::v1_8::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerStatusResponse { Ok(crate::v1_8::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerResponse { Ok(crate::v1_8::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerStatusResponse { Ok(crate::v1_8::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerResponse { Ok(crate::v1_8::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerStatusResponse { Ok(crate::v1_8::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -996,6 +1034,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replication_controller( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1017,12 +1056,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicationControllerResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1068,6 +1109,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replication_controller_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1086,12 +1128,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicationControllerForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/resource_quota.rs b/src/v1_8/api/core/v1/resource_quota.rs index 25b181b7ca..5c2d5f64b5 100644 --- a/src/v1_8/api/core/v1/resource_quota.rs +++ b/src/v1_8/api/core/v1/resource_quota.rs @@ -33,6 +33,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_resource_quota( namespace: &str, body: &crate::v1_8::api::core::v1::ResourceQuota, @@ -61,6 +62,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedResourceQuotaOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedResourceQuotaResponse { Ok(crate::v1_8::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl ResourceQuota { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_resource_quota( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_collection_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedResourceQuotaResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_resource_quota( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedResourceQuotaResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -303,6 +313,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_resource_quota( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -324,12 +335,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedResourceQuotaResponse { Ok(crate::v1_8::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +386,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_resource_quota_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +405,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListResourceQuotaForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaResponse { Ok(crate::v1_8::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaStatusResponse { Ok(crate::v1_8::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaResponse { Ok(crate::v1_8::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaStatusResponse { Ok(crate::v1_8::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaResponse { Ok(crate::v1_8::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaStatusResponse { Ok(crate::v1_8::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -996,6 +1034,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_resource_quota( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1017,12 +1056,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedResourceQuotaResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1068,6 +1109,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_resource_quota_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1086,12 +1128,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchResourceQuotaForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/secret.rs b/src/v1_8/api/core/v1/secret.rs index 12a3ad48c5..a219b13766 100644 --- a/src/v1_8/api/core/v1/secret.rs +++ b/src/v1_8/api/core/v1/secret.rs @@ -36,6 +36,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_secret( namespace: &str, body: &crate::v1_8::api::core::v1::Secret, @@ -64,6 +65,7 @@ impl Secret { } /// Optional parameters of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedSecretOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,12 +73,14 @@ pub struct CreateNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedSecretResponse { Ok(crate::v1_8::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -126,6 +130,7 @@ impl Secret { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_secret( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_collection_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedSecretResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteCollectionNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -218,6 +225,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_secret( name: &str, namespace: &str, @@ -239,6 +247,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedSecretResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -246,6 +255,7 @@ pub enum DeleteNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -306,6 +316,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_secret( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -327,12 +338,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedSecretResponse { Ok(crate::v1_8::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -376,6 +389,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_secret_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -394,12 +408,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListSecretForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -451,6 +467,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_secret( name: &str, namespace: &str, @@ -480,12 +497,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::patch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedSecretResponse { Ok(crate::v1_8::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -535,6 +554,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_secret( name: &str, namespace: &str, @@ -571,6 +591,7 @@ impl Secret { } /// Optional parameters of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedSecretOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -582,12 +603,14 @@ pub struct ReadNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedSecretResponse { Ok(crate::v1_8::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +662,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_secret( name: &str, namespace: &str, @@ -669,6 +693,7 @@ impl Secret { } /// Optional parameters of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedSecretOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,12 +701,14 @@ pub struct ReplaceNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedSecretResponse { Ok(crate::v1_8::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -729,6 +756,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_secret( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -750,12 +778,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedSecretResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -801,6 +831,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_secret_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -819,12 +850,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchSecretForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/service.rs b/src/v1_8/api/core/v1/service.rs index 3d5659cdad..a489a45581 100644 --- a/src/v1_8/api/core/v1/service.rs +++ b/src/v1_8/api/core/v1/service.rs @@ -33,6 +33,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -86,6 +88,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -137,6 +141,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy( name: &str, namespace: &str, @@ -162,6 +167,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -190,6 +196,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -217,6 +224,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -241,6 +249,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy( name: &str, namespace: &str, @@ -266,6 +275,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -294,6 +304,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -321,6 +332,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -345,6 +357,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy( name: &str, namespace: &str, @@ -370,6 +383,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -398,6 +412,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -425,6 +440,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -449,6 +465,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy( name: &str, namespace: &str, @@ -474,6 +491,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -502,6 +520,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -529,6 +548,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -553,6 +573,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service( namespace: &str, body: &crate::v1_8::api::core::v1::Service, @@ -581,6 +602,7 @@ impl Service { } /// Optional parameters of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -588,12 +610,14 @@ pub struct CreateNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceResponse { Ok(crate::v1_8::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -643,6 +667,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service( name: &str, namespace: &str, @@ -671,6 +696,7 @@ impl Service { } /// Optional parameters of [`Service::delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct DeleteNamespacedServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -678,6 +704,7 @@ pub struct DeleteNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -685,6 +712,7 @@ pub enum DeleteNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -745,6 +773,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -766,12 +795,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceResponse { Ok(crate::v1_8::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -815,6 +846,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -833,12 +865,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -890,6 +924,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service( name: &str, namespace: &str, @@ -919,12 +954,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceResponse { Ok(crate::v1_8::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -976,6 +1013,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_status( name: &str, namespace: &str, @@ -1005,12 +1043,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceStatusResponse { Ok(crate::v1_8::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1056,6 +1096,7 @@ impl Service { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_delete_namespaced_service( name: &str, namespace: &str, @@ -1075,12 +1116,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENamespacedServiceResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1140,6 +1183,7 @@ impl Service { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_delete_namespaced_service_with_path( name: &str, namespace: &str, @@ -1161,12 +1205,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_delete_namespaced_service_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENamespacedServiceWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENamespacedServiceWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1222,6 +1268,7 @@ impl Service { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_get_namespaced_service( name: &str, namespace: &str, @@ -1241,12 +1288,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_get_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNamespacedServiceResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1306,6 +1355,7 @@ impl Service { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_get_namespaced_service_with_path( name: &str, namespace: &str, @@ -1327,12 +1377,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_get_namespaced_service_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNamespacedServiceWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNamespacedServiceWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1388,6 +1440,7 @@ impl Service { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_patch_namespaced_service( name: &str, namespace: &str, @@ -1407,12 +1460,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_patch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNamespacedServiceResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1472,6 +1527,7 @@ impl Service { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_patch_namespaced_service_with_path( name: &str, namespace: &str, @@ -1493,12 +1549,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_patch_namespaced_service_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNamespacedServiceWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNamespacedServiceWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1554,6 +1612,7 @@ impl Service { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_post_namespaced_service( name: &str, namespace: &str, @@ -1573,12 +1632,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_post_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNamespacedServiceResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1638,6 +1699,7 @@ impl Service { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_post_namespaced_service_with_path( name: &str, namespace: &str, @@ -1659,12 +1721,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_post_namespaced_service_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNamespacedServiceWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNamespacedServiceWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1720,6 +1784,7 @@ impl Service { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_put_namespaced_service( name: &str, namespace: &str, @@ -1739,12 +1804,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_put_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNamespacedServiceResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1804,6 +1871,7 @@ impl Service { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_put_namespaced_service_with_path( name: &str, namespace: &str, @@ -1825,12 +1893,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_put_namespaced_service_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNamespacedServiceWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNamespacedServiceWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1890,6 +1960,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service( name: &str, namespace: &str, @@ -1926,6 +1997,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1937,12 +2009,14 @@ pub struct ReadNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceResponse { Ok(crate::v1_8::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1992,6 +2066,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_status( name: &str, namespace: &str, @@ -2020,6 +2095,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2027,12 +2103,14 @@ pub struct ReadNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceStatusResponse { Ok(crate::v1_8::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2084,6 +2162,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service( name: &str, namespace: &str, @@ -2114,6 +2193,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2121,12 +2201,14 @@ pub struct ReplaceNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceResponse { Ok(crate::v1_8::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2178,6 +2260,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_status( name: &str, namespace: &str, @@ -2208,6 +2291,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2215,12 +2299,14 @@ pub struct ReplaceNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceStatusResponse { Ok(crate::v1_8::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2268,6 +2354,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -2289,12 +2376,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2340,6 +2429,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2358,12 +2448,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/core/v1/service_account.rs b/src/v1_8/api/core/v1/service_account.rs index 187cf85976..3cb487d668 100644 --- a/src/v1_8/api/core/v1/service_account.rs +++ b/src/v1_8/api/core/v1/service_account.rs @@ -36,6 +36,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service_account( namespace: &str, body: &crate::v1_8::api::core::v1::ServiceAccount, @@ -64,6 +65,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceAccountOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,12 +73,14 @@ pub struct CreateNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceAccountResponse { Ok(crate::v1_8::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -126,6 +130,7 @@ impl ServiceAccount { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_service_account( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_collection_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedServiceAccountResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteCollectionNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -218,6 +225,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service_account( name: &str, namespace: &str, @@ -239,6 +247,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceAccountResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -246,6 +255,7 @@ pub enum DeleteNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -306,6 +316,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service_account( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -327,12 +338,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceAccountResponse { Ok(crate::v1_8::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -376,6 +389,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_account_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -394,12 +408,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceAccountForAllNamespacesResponse { Ok(crate::v1_8::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -451,6 +467,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_account( name: &str, namespace: &str, @@ -480,12 +497,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::patch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceAccountResponse { Ok(crate::v1_8::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -535,6 +554,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_account( name: &str, namespace: &str, @@ -571,6 +591,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceAccountOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -582,12 +603,14 @@ pub struct ReadNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceAccountResponse { Ok(crate::v1_8::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +662,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_account( name: &str, namespace: &str, @@ -669,6 +693,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceAccountOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,12 +701,14 @@ pub struct ReplaceNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceAccountResponse { Ok(crate::v1_8::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -729,6 +756,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service_account( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -750,12 +778,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceAccountResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -801,6 +831,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_account_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -819,12 +850,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceAccountForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/extensions/v1beta1/daemon_set.rs b/src/v1_8/api/extensions/v1beta1/daemon_set.rs index ffdf010ddb..1278abeadc 100644 --- a/src/v1_8/api/extensions/v1beta1/daemon_set.rs +++ b/src/v1_8/api/extensions/v1beta1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_8::api::extensions::v1beta1::DaemonSet, @@ -61,6 +62,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_8::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_8::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_8::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_8::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_8::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_8::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -992,6 +1030,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1010,12 +1049,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1106,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1086,12 +1128,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/extensions/v1beta1/deployment.rs b/src/v1_8/api/extensions/v1beta1/deployment.rs index 4f816c5fe3..0c6cc0c29f 100644 --- a/src/v1_8/api/extensions/v1beta1/deployment.rs +++ b/src/v1_8/api/extensions/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_8::api::extensions::v1beta1::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_8::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_8::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_8::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_8::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_8::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_8::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -992,6 +1030,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1010,12 +1049,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1106,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1086,12 +1128,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/extensions/v1beta1/deployment_rollback.rs b/src/v1_8/api/extensions/v1beta1/deployment_rollback.rs index 11a54f81f0..38ef66733c 100644 --- a/src/v1_8/api/extensions/v1beta1/deployment_rollback.rs +++ b/src/v1_8/api/extensions/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -67,6 +68,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// If 'true', then the output is pretty printed. @@ -74,12 +76,14 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_8::api::extensions::v1beta1::DeploymentRollback), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/extensions/v1beta1/ingress.rs b/src/v1_8/api/extensions/v1beta1/ingress.rs index 881b7aab36..396155fc29 100644 --- a/src/v1_8/api/extensions/v1beta1/ingress.rs +++ b/src/v1_8/api/extensions/v1beta1/ingress.rs @@ -33,6 +33,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_ingress( namespace: &str, body: &crate::v1_8::api::extensions::v1beta1::Ingress, @@ -61,6 +62,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedIngressOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedIngressResponse { Ok(crate::v1_8::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl Ingress { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_ingress( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_collection_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedIngressResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_ingress( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedIngressResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_ingress_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListIngressForAllNamespacesResponse { Ok(crate::v1_8::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_ingress( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -391,12 +405,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedIngressResponse { Ok(crate::v1_8::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressResponse { Ok(crate::v1_8::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressResponse { Ok(crate::v1_8::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressResponse { Ok(crate::v1_8::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -992,6 +1030,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_ingress_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1010,12 +1049,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchIngressForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1065,6 +1106,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_ingress( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1086,12 +1128,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedIngressResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/extensions/v1beta1/mod.rs b/src/v1_8/api/extensions/v1beta1/mod.rs index f58e043b7b..54d3890f93 100644 --- a/src/v1_8/api/extensions/v1beta1/mod.rs +++ b/src/v1_8/api/extensions/v1beta1/mod.rs @@ -1,330 +1,230 @@ mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod http_ingress_path; -pub use self::http_ingress_path::{ - HTTPIngressPath, -}; +pub use self::http_ingress_path::HTTPIngressPath; mod http_ingress_rule_value; -pub use self::http_ingress_rule_value::{ - HTTPIngressRuleValue, -}; +pub use self::http_ingress_rule_value::HTTPIngressRuleValue; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod ingress; -pub use self::ingress::{ - Ingress, - CreateNamespacedIngressOptional, CreateNamespacedIngressResponse, - DeleteCollectionNamespacedIngressResponse, - DeleteNamespacedIngressResponse, - ListIngressForAllNamespacesResponse, - ListNamespacedIngressResponse, - PatchNamespacedIngressResponse, - PatchNamespacedIngressStatusResponse, - ReadNamespacedIngressOptional, ReadNamespacedIngressResponse, - ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse, - ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse, - ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse, - WatchIngressForAllNamespacesResponse, - WatchNamespacedIngressResponse, -}; +pub use self::ingress::Ingress; +#[cfg(feature = "api")] pub use self::ingress::{CreateNamespacedIngressOptional, CreateNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::DeleteCollectionNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::DeleteNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::ListIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::ListNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressStatusResponse; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressOptional, ReadNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::WatchIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::WatchNamespacedIngressResponse; mod ingress_backend; -pub use self::ingress_backend::{ - IngressBackend, -}; +pub use self::ingress_backend::IngressBackend; mod ingress_list; -pub use self::ingress_list::{ - IngressList, -}; +pub use self::ingress_list::IngressList; mod ingress_rule; -pub use self::ingress_rule::{ - IngressRule, -}; +pub use self::ingress_rule::IngressRule; mod ingress_spec; -pub use self::ingress_spec::{ - IngressSpec, -}; +pub use self::ingress_spec::IngressSpec; mod ingress_status; -pub use self::ingress_status::{ - IngressStatus, -}; +pub use self::ingress_status::IngressStatus; mod ingress_tls; -pub use self::ingress_tls::{ - IngressTLS, -}; +pub use self::ingress_tls::IngressTLS; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedReplicationControllerDummyScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerDummyScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_8/api/extensions/v1beta1/network_policy.rs b/src/v1_8/api/extensions/v1beta1/network_policy.rs index 8c82e1405a..2f96da88b8 100644 --- a/src/v1_8/api/extensions/v1beta1/network_policy.rs +++ b/src/v1_8/api/extensions/v1beta1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_8::api::extensions::v1beta1::NetworkPolicy, @@ -58,6 +59,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,12 +67,14 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_8::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -120,6 +124,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -143,6 +148,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -150,6 +156,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -233,6 +241,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -300,6 +310,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -321,12 +332,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_8::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -388,12 +402,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_8::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -474,12 +491,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_8::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -529,6 +548,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -565,6 +585,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -576,12 +597,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_8::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -633,6 +656,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -663,6 +687,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -670,12 +695,14 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_8::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -723,6 +750,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -744,12 +772,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -795,6 +825,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -813,12 +844,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/extensions/v1beta1/pod_security_policy.rs b/src/v1_8/api/extensions/v1beta1/pod_security_policy.rs index 00d3acc5c6..72b4784904 100644 --- a/src/v1_8/api/extensions/v1beta1/pod_security_policy.rs +++ b/src/v1_8/api/extensions/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_8::api::extensions::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -51,6 +52,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,12 +60,14 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_8::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -109,6 +113,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -129,6 +134,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -136,6 +142,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -194,6 +201,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -213,6 +221,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -220,6 +229,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -276,6 +286,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -294,12 +305,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_8::api::extensions::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -347,6 +360,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -374,12 +388,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_8::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -425,6 +441,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -459,6 +476,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -470,12 +488,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_8::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -523,6 +543,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_8::api::extensions::v1beta1::PodSecurityPolicy, @@ -551,6 +572,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -558,12 +580,14 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_8::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -607,6 +631,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -625,12 +650,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/extensions/v1beta1/replica_set.rs b/src/v1_8/api/extensions/v1beta1/replica_set.rs index f420df7f37..8e82834a82 100644 --- a/src/v1_8/api/extensions/v1beta1/replica_set.rs +++ b/src/v1_8/api/extensions/v1beta1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_8::api::extensions::v1beta1::ReplicaSet, @@ -61,6 +62,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_8::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -303,6 +313,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -324,12 +335,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_8::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +386,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +405,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_8::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_8::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -534,6 +553,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -563,12 +583,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -618,6 +640,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -654,6 +677,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -665,12 +689,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_8::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +746,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -748,6 +775,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,12 +783,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -812,6 +842,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -842,6 +873,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -849,12 +881,14 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_8::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -906,6 +940,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -936,6 +971,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -943,12 +979,14 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_8::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -996,6 +1034,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1017,12 +1056,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1068,6 +1109,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1086,12 +1128,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/extensions/v1beta1/scale.rs b/src/v1_8/api/extensions/v1beta1/scale.rs index 59574e9c08..91d0622cae 100644 --- a/src/v1_8/api/extensions/v1beta1/scale.rs +++ b/src/v1_8/api/extensions/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_8::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_8::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_8::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_8::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_8::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_8::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -595,6 +617,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -602,12 +625,14 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_8::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -659,6 +684,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -689,6 +715,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -696,12 +723,14 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_8::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -753,6 +782,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -783,6 +813,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -790,12 +821,14 @@ pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_8::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/networking/v1/mod.rs b/src/v1_8/api/networking/v1/mod.rs index fcd95f99a8..23233ec53d 100644 --- a/src/v1_8/api/networking/v1/mod.rs +++ b/src/v1_8/api/networking/v1/mod.rs @@ -1,50 +1,34 @@ mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; diff --git a/src/v1_8/api/networking/v1/network_policy.rs b/src/v1_8/api/networking/v1/network_policy.rs index 0f48143dd8..5cf03c596a 100644 --- a/src/v1_8/api/networking/v1/network_policy.rs +++ b/src/v1_8/api/networking/v1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_8::api::networking::v1::NetworkPolicy, @@ -58,6 +59,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,12 +67,14 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_8::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -120,6 +124,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -143,6 +148,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -150,6 +156,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -233,6 +241,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -300,6 +310,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -321,12 +332,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_8::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -388,12 +402,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_8::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -474,12 +491,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_8::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -529,6 +548,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -565,6 +585,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -576,12 +597,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_8::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -633,6 +656,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -663,6 +687,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -670,12 +695,14 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_8::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -723,6 +750,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -744,12 +772,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -795,6 +825,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -813,12 +844,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/policy/v1beta1/eviction.rs b/src/v1_8/api/policy/v1beta1/eviction.rs index 163e8a6768..76dbe2f592 100644 --- a/src/v1_8/api/policy/v1beta1/eviction.rs +++ b/src/v1_8/api/policy/v1beta1/eviction.rs @@ -34,6 +34,7 @@ impl Eviction { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_eviction( name: &str, namespace: &str, @@ -64,6 +65,7 @@ impl Eviction { } /// Optional parameters of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodEvictionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,12 +73,14 @@ pub struct CreateNamespacedPodEvictionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodEvictionResponse { Ok(crate::v1_8::api::policy::v1beta1::Eviction), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodEvictionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/policy/v1beta1/mod.rs b/src/v1_8/api/policy/v1beta1/mod.rs index a1078d77e3..a1e37a1980 100644 --- a/src/v1_8/api/policy/v1beta1/mod.rs +++ b/src/v1_8/api/policy/v1beta1/mod.rs @@ -1,39 +1,29 @@ mod eviction; -pub use self::eviction::{ - Eviction, - CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse, -}; +pub use self::eviction::Eviction; +#[cfg(feature = "api")] pub use self::eviction::{CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse}; mod pod_disruption_budget; -pub use self::pod_disruption_budget::{ - PodDisruptionBudget, - CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse, - DeleteCollectionNamespacedPodDisruptionBudgetResponse, - DeleteNamespacedPodDisruptionBudgetResponse, - ListNamespacedPodDisruptionBudgetResponse, - ListPodDisruptionBudgetForAllNamespacesResponse, - PatchNamespacedPodDisruptionBudgetResponse, - PatchNamespacedPodDisruptionBudgetStatusResponse, - ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse, - ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse, - ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse, - ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse, - WatchNamespacedPodDisruptionBudgetResponse, - WatchPodDisruptionBudgetForAllNamespacesResponse, -}; +pub use self::pod_disruption_budget::PodDisruptionBudget; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteCollectionNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListPodDisruptionBudgetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetStatusResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchPodDisruptionBudgetForAllNamespacesResponse; mod pod_disruption_budget_list; -pub use self::pod_disruption_budget_list::{ - PodDisruptionBudgetList, -}; +pub use self::pod_disruption_budget_list::PodDisruptionBudgetList; mod pod_disruption_budget_spec; -pub use self::pod_disruption_budget_spec::{ - PodDisruptionBudgetSpec, -}; +pub use self::pod_disruption_budget_spec::PodDisruptionBudgetSpec; mod pod_disruption_budget_status; -pub use self::pod_disruption_budget_status::{ - PodDisruptionBudgetStatus, -}; +pub use self::pod_disruption_budget_status::PodDisruptionBudgetStatus; diff --git a/src/v1_8/api/policy/v1beta1/pod_disruption_budget.rs b/src/v1_8/api/policy/v1beta1/pod_disruption_budget.rs index 077fa5b871..40459d1b14 100644 --- a/src/v1_8/api/policy/v1beta1/pod_disruption_budget.rs +++ b/src/v1_8/api/policy/v1beta1/pod_disruption_budget.rs @@ -32,6 +32,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_disruption_budget( namespace: &str, body: &crate::v1_8::api::policy::v1beta1::PodDisruptionBudget, @@ -60,6 +61,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,12 +69,14 @@ pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_8::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -122,6 +126,7 @@ impl PodDisruptionBudget { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_disruption_budget( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -145,6 +150,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_collection_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -152,6 +158,7 @@ pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -235,6 +243,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -242,6 +251,7 @@ pub enum DeleteNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -302,6 +312,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -323,12 +334,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_8::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -372,6 +385,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_disruption_budget_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -390,12 +404,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_8::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -447,6 +463,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -476,12 +493,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_8::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -533,6 +552,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -562,12 +582,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_8::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -617,6 +639,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -653,6 +676,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -664,12 +688,14 @@ pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_8::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -719,6 +745,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -747,6 +774,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -754,12 +782,14 @@ pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_8::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -811,6 +841,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -841,6 +872,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -848,12 +880,14 @@ pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_8::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -905,6 +939,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -935,6 +970,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -942,12 +978,14 @@ pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_8::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -995,6 +1033,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -1016,12 +1055,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1067,6 +1108,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_disruption_budget_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1085,12 +1127,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1/cluster_role.rs b/src/v1_8/api/rbac/v1/cluster_role.rs index 4cb7544463..d1c349b820 100644 --- a/src/v1_8/api/rbac/v1/cluster_role.rs +++ b/src/v1_8/api/rbac/v1/cluster_role.rs @@ -26,6 +26,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_8::api::rbac::v1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -51,6 +52,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,12 +60,14 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -109,6 +113,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -128,6 +133,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -135,6 +141,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -193,6 +200,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -213,6 +221,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -220,6 +229,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -276,6 +286,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -294,12 +305,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -347,6 +360,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -374,12 +388,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -425,6 +441,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -451,6 +468,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -458,12 +476,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -511,6 +531,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_8::api::rbac::v1::ClusterRole, @@ -539,6 +560,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -546,12 +568,14 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -595,6 +619,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -613,12 +638,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1/cluster_role_binding.rs b/src/v1_8/api/rbac/v1/cluster_role_binding.rs index 582fcb2005..cd1d945f12 100644 --- a/src/v1_8/api/rbac/v1/cluster_role_binding.rs +++ b/src/v1_8/api/rbac/v1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_8::api::rbac::v1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,12 +63,14 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -112,6 +116,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -131,6 +136,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -138,6 +144,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -196,6 +203,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -216,6 +224,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -223,6 +232,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -279,6 +289,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -297,12 +308,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +363,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -377,12 +391,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -428,6 +444,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -454,6 +471,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -461,12 +479,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -514,6 +534,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_8::api::rbac::v1::ClusterRoleBinding, @@ -542,6 +563,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -549,12 +571,14 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -598,6 +622,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -616,12 +641,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1/mod.rs b/src/v1_8/api/rbac/v1/mod.rs index d7baca4eab..575e7a3834 100644 --- a/src/v1_8/api/rbac/v1/mod.rs +++ b/src/v1_8/api/rbac/v1/mod.rs @@ -1,91 +1,69 @@ mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_8/api/rbac/v1/role.rs b/src/v1_8/api/rbac/v1/role.rs index 8cf332edd5..3aea122da8 100644 --- a/src/v1_8/api/rbac/v1/role.rs +++ b/src/v1_8/api/rbac/v1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_8::api::rbac::v1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,12 +67,14 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -120,6 +124,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -143,6 +148,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -150,6 +156,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -233,6 +241,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -300,6 +310,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -321,12 +332,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -388,12 +402,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_8::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -474,12 +491,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -529,6 +548,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -557,6 +577,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -564,12 +585,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -621,6 +644,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -651,6 +675,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -658,12 +683,14 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -711,6 +738,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -732,12 +760,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +813,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -801,12 +832,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1/role_binding.rs b/src/v1_8/api/rbac/v1/role_binding.rs index 155af41f33..f038c0e228 100644 --- a/src/v1_8/api/rbac/v1/role_binding.rs +++ b/src/v1_8/api/rbac/v1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_8::api::rbac::v1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -303,6 +313,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -324,12 +335,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +386,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +405,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_8::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +551,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -560,6 +580,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,12 +588,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -624,6 +647,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -654,6 +678,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -661,12 +686,14 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -714,6 +741,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -735,12 +763,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -786,6 +816,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -804,12 +835,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1alpha1/cluster_role.rs b/src/v1_8/api/rbac/v1alpha1/cluster_role.rs index a6c1a88da4..53212d89a0 100644 --- a/src/v1_8/api/rbac/v1alpha1/cluster_role.rs +++ b/src/v1_8/api/rbac/v1alpha1/cluster_role.rs @@ -26,6 +26,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_8::api::rbac::v1alpha1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -51,6 +52,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,12 +60,14 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -109,6 +113,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -128,6 +133,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -135,6 +141,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -193,6 +200,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -213,6 +221,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -220,6 +229,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -276,6 +286,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -294,12 +305,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1alpha1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -347,6 +360,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -374,12 +388,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -425,6 +441,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -451,6 +468,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -458,12 +476,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -511,6 +531,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_8::api::rbac::v1alpha1::ClusterRole, @@ -539,6 +560,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -546,12 +568,14 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -595,6 +619,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -613,12 +638,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1alpha1/cluster_role_binding.rs b/src/v1_8/api/rbac/v1alpha1/cluster_role_binding.rs index feea205a94..abb87bd2ee 100644 --- a/src/v1_8/api/rbac/v1alpha1/cluster_role_binding.rs +++ b/src/v1_8/api/rbac/v1alpha1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_8::api::rbac::v1alpha1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,12 +63,14 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -112,6 +116,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -131,6 +136,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -138,6 +144,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -196,6 +203,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -216,6 +224,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -223,6 +232,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -279,6 +289,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -297,12 +308,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1alpha1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +363,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -377,12 +391,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -428,6 +444,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -454,6 +471,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -461,12 +479,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -514,6 +534,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_8::api::rbac::v1alpha1::ClusterRoleBinding, @@ -542,6 +563,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -549,12 +571,14 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -598,6 +622,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -616,12 +641,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1alpha1/mod.rs b/src/v1_8/api/rbac/v1alpha1/mod.rs index d7baca4eab..575e7a3834 100644 --- a/src/v1_8/api/rbac/v1alpha1/mod.rs +++ b/src/v1_8/api/rbac/v1alpha1/mod.rs @@ -1,91 +1,69 @@ mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_8/api/rbac/v1alpha1/role.rs b/src/v1_8/api/rbac/v1alpha1/role.rs index 8481d3af01..2cce6a4d4c 100644 --- a/src/v1_8/api/rbac/v1alpha1/role.rs +++ b/src/v1_8/api/rbac/v1alpha1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_8::api::rbac::v1alpha1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,12 +67,14 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -120,6 +124,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -143,6 +148,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -150,6 +156,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -233,6 +241,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -300,6 +310,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -321,12 +332,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -388,12 +402,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_8::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -474,12 +491,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -529,6 +548,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -557,6 +577,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -564,12 +585,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -621,6 +644,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -651,6 +675,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -658,12 +683,14 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -711,6 +738,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -732,12 +760,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +813,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -801,12 +832,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1alpha1/role_binding.rs b/src/v1_8/api/rbac/v1alpha1/role_binding.rs index 2f34edc1e1..9112c13d1e 100644 --- a/src/v1_8/api/rbac/v1alpha1/role_binding.rs +++ b/src/v1_8/api/rbac/v1alpha1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_8::api::rbac::v1alpha1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -303,6 +313,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -324,12 +335,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +386,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +405,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_8::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +551,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -560,6 +580,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,12 +588,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -624,6 +647,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -654,6 +678,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -661,12 +686,14 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -714,6 +741,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -735,12 +763,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -786,6 +816,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -804,12 +835,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1beta1/cluster_role.rs b/src/v1_8/api/rbac/v1beta1/cluster_role.rs index 4d7139d4fb..1b9e6a9061 100644 --- a/src/v1_8/api/rbac/v1beta1/cluster_role.rs +++ b/src/v1_8/api/rbac/v1beta1/cluster_role.rs @@ -26,6 +26,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_8::api::rbac::v1beta1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -51,6 +52,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,12 +60,14 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -109,6 +113,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -128,6 +133,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -135,6 +141,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -193,6 +200,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -213,6 +221,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -220,6 +229,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -276,6 +286,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -294,12 +305,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1beta1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -347,6 +360,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -374,12 +388,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -425,6 +441,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -451,6 +468,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -458,12 +476,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -511,6 +531,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_8::api::rbac::v1beta1::ClusterRole, @@ -539,6 +560,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -546,12 +568,14 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_8::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -595,6 +619,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -613,12 +638,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1beta1/cluster_role_binding.rs b/src/v1_8/api/rbac/v1beta1/cluster_role_binding.rs index 2378640c90..e07d604443 100644 --- a/src/v1_8/api/rbac/v1beta1/cluster_role_binding.rs +++ b/src/v1_8/api/rbac/v1beta1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_8::api::rbac::v1beta1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,12 +63,14 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -112,6 +116,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -131,6 +136,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -138,6 +144,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -196,6 +203,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -216,6 +224,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -223,6 +232,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -279,6 +289,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -297,12 +308,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1beta1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +363,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -377,12 +391,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -428,6 +444,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -454,6 +471,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -461,12 +479,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -514,6 +534,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_8::api::rbac::v1beta1::ClusterRoleBinding, @@ -542,6 +563,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -549,12 +571,14 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -598,6 +622,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -616,12 +641,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1beta1/mod.rs b/src/v1_8/api/rbac/v1beta1/mod.rs index d7baca4eab..575e7a3834 100644 --- a/src/v1_8/api/rbac/v1beta1/mod.rs +++ b/src/v1_8/api/rbac/v1beta1/mod.rs @@ -1,91 +1,69 @@ mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_8/api/rbac/v1beta1/role.rs b/src/v1_8/api/rbac/v1beta1/role.rs index 5f2c769d5b..ac94b5f99d 100644 --- a/src/v1_8/api/rbac/v1beta1/role.rs +++ b/src/v1_8/api/rbac/v1beta1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_8::api::rbac::v1beta1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,12 +67,14 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -120,6 +124,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -143,6 +148,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -150,6 +156,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -233,6 +241,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -300,6 +310,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -321,12 +332,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -388,12 +402,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_8::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -474,12 +491,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -529,6 +548,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -557,6 +577,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -564,12 +585,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -621,6 +644,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -651,6 +675,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -658,12 +683,14 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_8::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -711,6 +738,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -732,12 +760,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -783,6 +813,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -801,12 +832,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/rbac/v1beta1/role_binding.rs b/src/v1_8/api/rbac/v1beta1/role_binding.rs index c842164c8a..7345bf9ce8 100644 --- a/src/v1_8/api/rbac/v1beta1/role_binding.rs +++ b/src/v1_8/api/rbac/v1beta1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_8::api::rbac::v1beta1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,12 +70,14 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -146,6 +151,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -153,6 +159,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -236,6 +244,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -303,6 +313,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -324,12 +335,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -373,6 +386,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -391,12 +405,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_8::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -477,12 +494,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +551,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -560,6 +580,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,12 +588,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -624,6 +647,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -654,6 +678,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -661,12 +686,14 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_8::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -714,6 +741,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -735,12 +763,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -786,6 +816,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -804,12 +835,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/scheduling/v1alpha1/mod.rs b/src/v1_8/api/scheduling/v1alpha1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_8/api/scheduling/v1alpha1/mod.rs +++ b/src/v1_8/api/scheduling/v1alpha1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_8/api/scheduling/v1alpha1/priority_class.rs b/src/v1_8/api/scheduling/v1alpha1/priority_class.rs index 32ba223301..d1ad77e04c 100644 --- a/src/v1_8/api/scheduling/v1alpha1/priority_class.rs +++ b/src/v1_8/api/scheduling/v1alpha1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_8::api::scheduling::v1alpha1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -57,6 +58,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -64,12 +66,14 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_8::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -115,6 +119,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -135,6 +140,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -142,6 +148,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -200,6 +207,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -219,6 +227,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -226,6 +235,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -282,6 +292,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -300,12 +311,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_8::api::scheduling::v1alpha1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -353,6 +366,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -380,12 +394,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_8::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -431,6 +447,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -465,6 +482,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -476,12 +494,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_8::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -529,6 +549,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_8::api::scheduling::v1alpha1::PriorityClass, @@ -557,6 +578,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -564,12 +586,14 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_8::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -613,6 +637,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -631,12 +656,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/settings/v1alpha1/mod.rs b/src/v1_8/api/settings/v1alpha1/mod.rs index f0ebd9df12..7816e600a8 100644 --- a/src/v1_8/api/settings/v1alpha1/mod.rs +++ b/src/v1_8/api/settings/v1alpha1/mod.rs @@ -1,25 +1,19 @@ mod pod_preset; -pub use self::pod_preset::{ - PodPreset, - CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse, - DeleteCollectionNamespacedPodPresetResponse, - DeleteNamespacedPodPresetResponse, - ListNamespacedPodPresetResponse, - ListPodPresetForAllNamespacesResponse, - PatchNamespacedPodPresetResponse, - ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse, - ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse, - WatchNamespacedPodPresetResponse, - WatchPodPresetForAllNamespacesResponse, -}; +pub use self::pod_preset::PodPreset; +#[cfg(feature = "api")] pub use self::pod_preset::{CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteCollectionNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListPodPresetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_preset::PatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::{ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::{ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::WatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::WatchPodPresetForAllNamespacesResponse; mod pod_preset_list; -pub use self::pod_preset_list::{ - PodPresetList, -}; +pub use self::pod_preset_list::PodPresetList; mod pod_preset_spec; -pub use self::pod_preset_spec::{ - PodPresetSpec, -}; +pub use self::pod_preset_spec::PodPresetSpec; diff --git a/src/v1_8/api/settings/v1alpha1/pod_preset.rs b/src/v1_8/api/settings/v1alpha1/pod_preset.rs index bae8fa5f99..b7d70dc9b6 100644 --- a/src/v1_8/api/settings/v1alpha1/pod_preset.rs +++ b/src/v1_8/api/settings/v1alpha1/pod_preset.rs @@ -28,6 +28,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_preset( namespace: &str, body: &crate::v1_8::api::settings::v1alpha1::PodPreset, @@ -56,6 +57,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodPresetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -63,12 +65,14 @@ pub struct CreateNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodPresetResponse { Ok(crate::v1_8::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -118,6 +122,7 @@ impl PodPreset { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_preset( namespace: &str, delete_optional: crate::v1_8::DeleteOptional<'_>, @@ -141,6 +146,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_collection_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodPresetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -148,6 +154,7 @@ pub enum DeleteCollectionNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -210,6 +217,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_preset( name: &str, namespace: &str, @@ -231,6 +239,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodPresetResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeleteNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -298,6 +308,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_preset( namespace: &str, optional: crate::v1_8::ListOptional<'_>, @@ -319,12 +330,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodPresetResponse { Ok(crate::v1_8::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_preset_for_all_namespaces( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -386,12 +400,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodPresetForAllNamespacesResponse { Ok(crate::v1_8::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_preset( name: &str, namespace: &str, @@ -472,12 +489,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::patch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodPresetResponse { Ok(crate::v1_8::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -527,6 +546,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_preset( name: &str, namespace: &str, @@ -563,6 +583,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodPresetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -574,12 +595,14 @@ pub struct ReadNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodPresetResponse { Ok(crate::v1_8::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -631,6 +654,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_preset( name: &str, namespace: &str, @@ -661,6 +685,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodPresetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -668,12 +693,14 @@ pub struct ReplaceNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodPresetResponse { Ok(crate::v1_8::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -721,6 +748,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_preset( namespace: &str, optional: crate::v1_8::WatchOptional<'_>, @@ -742,12 +770,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodPresetResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -793,6 +823,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_preset_for_all_namespaces( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -811,12 +842,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodPresetForAllNamespacesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/storage/v1/mod.rs b/src/v1_8/api/storage/v1/mod.rs index d20d9cc056..0d65688c2d 100644 --- a/src/v1_8/api/storage/v1/mod.rs +++ b/src/v1_8/api/storage/v1/mod.rs @@ -1,18 +1,14 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; diff --git a/src/v1_8/api/storage/v1/storage_class.rs b/src/v1_8/api/storage/v1/storage_class.rs index 105a78f30c..111ac18fd2 100644 --- a/src/v1_8/api/storage/v1/storage_class.rs +++ b/src/v1_8/api/storage/v1/storage_class.rs @@ -40,6 +40,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_8::api::storage::v1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -65,6 +66,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -72,12 +74,14 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_8::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -143,6 +148,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -150,6 +156,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -208,6 +215,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -227,6 +235,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -234,6 +243,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -290,6 +300,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -308,12 +319,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_8::api::storage::v1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -361,6 +374,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -388,12 +402,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_8::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -439,6 +455,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -473,6 +490,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -484,12 +502,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_8::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -537,6 +557,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_8::api::storage::v1::StorageClass, @@ -565,6 +586,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -572,12 +594,14 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_8::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -621,6 +645,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -639,12 +664,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/api/storage/v1beta1/mod.rs b/src/v1_8/api/storage/v1beta1/mod.rs index d20d9cc056..0d65688c2d 100644 --- a/src/v1_8/api/storage/v1beta1/mod.rs +++ b/src/v1_8/api/storage/v1beta1/mod.rs @@ -1,18 +1,14 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; diff --git a/src/v1_8/api/storage/v1beta1/storage_class.rs b/src/v1_8/api/storage/v1beta1/storage_class.rs index 904d063bda..8e68380969 100644 --- a/src/v1_8/api/storage/v1beta1/storage_class.rs +++ b/src/v1_8/api/storage/v1beta1/storage_class.rs @@ -40,6 +40,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_8::api::storage::v1beta1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -65,6 +66,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -72,12 +74,14 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_8::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +127,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -143,6 +148,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -150,6 +156,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -208,6 +215,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -227,6 +235,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -234,6 +243,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -290,6 +300,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -308,12 +319,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_8::api::storage::v1beta1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -361,6 +374,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -388,12 +402,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_8::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -439,6 +455,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -473,6 +490,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -484,12 +502,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_8::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -537,6 +557,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_8::api::storage::v1beta1::StorageClass, @@ -565,6 +586,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -572,12 +594,14 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_8::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -621,6 +645,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -639,12 +664,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs b/src/v1_8/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs index 7041cc150e..0440fe7d76 100644 --- a/src/v1_8/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs +++ b/src/v1_8/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs @@ -28,6 +28,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_custom_resource_definition( body: &crate::v1_8::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, optional: CreateCustomResourceDefinitionOptional<'_>, @@ -53,6 +54,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCustomResourceDefinitionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,12 +62,14 @@ pub struct CreateCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCustomResourceDefinitionResponse { Ok(crate::v1_8::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -111,6 +115,7 @@ impl CustomResourceDefinition { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_custom_resource_definition( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -131,6 +136,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_collection_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCustomResourceDefinitionResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -138,6 +144,7 @@ pub enum DeleteCollectionCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -196,6 +203,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_custom_resource_definition( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -215,6 +223,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCustomResourceDefinitionResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -222,6 +231,7 @@ pub enum DeleteCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -278,6 +288,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_custom_resource_definition( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -296,12 +307,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::list_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCustomResourceDefinitionResponse { Ok(crate::v1_8::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinitionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -349,6 +362,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -376,12 +390,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionResponse { Ok(crate::v1_8::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -427,6 +443,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition( name: &str, optional: ReadCustomResourceDefinitionOptional<'_>, @@ -461,6 +478,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -472,12 +490,14 @@ pub struct ReadCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionResponse { Ok(crate::v1_8::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -525,6 +545,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition( name: &str, body: &crate::v1_8::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -553,6 +574,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -560,12 +582,14 @@ pub struct ReplaceCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionResponse { Ok(crate::v1_8::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -613,6 +637,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition_status( name: &str, body: &crate::v1_8::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -641,6 +666,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -648,12 +674,14 @@ pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionStatusResponse { Ok(crate::v1_8::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -697,6 +725,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_custom_resource_definition( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -715,12 +744,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::watch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCustomResourceDefinitionResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs b/src/v1_8/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs index 6ba8e7377f..369bdfc822 100644 --- a/src/v1_8/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs +++ b/src/v1_8/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs @@ -1,74 +1,48 @@ mod custom_resource_definition; -pub use self::custom_resource_definition::{ - CustomResourceDefinition, - CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse, - DeleteCollectionCustomResourceDefinitionResponse, - DeleteCustomResourceDefinitionResponse, - ListCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionResponse, - ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse, - ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse, - ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse, - WatchCustomResourceDefinitionResponse, -}; +pub use self::custom_resource_definition::CustomResourceDefinition; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCollectionCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::ListCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::WatchCustomResourceDefinitionResponse; mod custom_resource_definition_condition; -pub use self::custom_resource_definition_condition::{ - CustomResourceDefinitionCondition, -}; +pub use self::custom_resource_definition_condition::CustomResourceDefinitionCondition; mod custom_resource_definition_list; -pub use self::custom_resource_definition_list::{ - CustomResourceDefinitionList, -}; +pub use self::custom_resource_definition_list::CustomResourceDefinitionList; mod custom_resource_definition_names; -pub use self::custom_resource_definition_names::{ - CustomResourceDefinitionNames, -}; +pub use self::custom_resource_definition_names::CustomResourceDefinitionNames; mod custom_resource_definition_spec; -pub use self::custom_resource_definition_spec::{ - CustomResourceDefinitionSpec, -}; +pub use self::custom_resource_definition_spec::CustomResourceDefinitionSpec; mod custom_resource_definition_status; -pub use self::custom_resource_definition_status::{ - CustomResourceDefinitionStatus, -}; +pub use self::custom_resource_definition_status::CustomResourceDefinitionStatus; mod custom_resource_validation; -pub use self::custom_resource_validation::{ - CustomResourceValidation, -}; +pub use self::custom_resource_validation::CustomResourceValidation; mod external_documentation; -pub use self::external_documentation::{ - ExternalDocumentation, -}; +pub use self::external_documentation::ExternalDocumentation; mod json; -pub use self::json::{ - JSON, -}; +pub use self::json::JSON; mod json_schema_props; -pub use self::json_schema_props::{ - JSONSchemaProps, -}; +pub use self::json_schema_props::JSONSchemaProps; mod json_schema_props_or_array; -pub use self::json_schema_props_or_array::{ - JSONSchemaPropsOrArray, -}; +pub use self::json_schema_props_or_array::JSONSchemaPropsOrArray; mod json_schema_props_or_bool; -pub use self::json_schema_props_or_bool::{ - JSONSchemaPropsOrBool, -}; +pub use self::json_schema_props_or_bool::JSONSchemaPropsOrBool; mod json_schema_props_or_string_array; -pub use self::json_schema_props_or_string_array::{ - JSONSchemaPropsOrStringArray, -}; +pub use self::json_schema_props_or_string_array::JSONSchemaPropsOrStringArray; diff --git a/src/v1_8/apimachinery/pkg/api/resource/mod.rs b/src/v1_8/apimachinery/pkg/api/resource/mod.rs index 352925b923..629eeca5bc 100644 --- a/src/v1_8/apimachinery/pkg/api/resource/mod.rs +++ b/src/v1_8/apimachinery/pkg/api/resource/mod.rs @@ -1,5 +1,3 @@ mod quantity; -pub use self::quantity::{ - Quantity, -}; +pub use self::quantity::Quantity; diff --git a/src/v1_8/apimachinery/pkg/apis/meta/v1/mod.rs b/src/v1_8/apimachinery/pkg/apis/meta/v1/mod.rs index b3923de75a..0f6f633d88 100644 --- a/src/v1_8/apimachinery/pkg/apis/meta/v1/mod.rs +++ b/src/v1_8/apimachinery/pkg/apis/meta/v1/mod.rs @@ -1,110 +1,66 @@ mod api_group; -pub use self::api_group::{ - APIGroup, -}; +pub use self::api_group::APIGroup; mod api_group_list; -pub use self::api_group_list::{ - APIGroupList, -}; +pub use self::api_group_list::APIGroupList; mod api_resource; -pub use self::api_resource::{ - APIResource, -}; +pub use self::api_resource::APIResource; mod api_resource_list; -pub use self::api_resource_list::{ - APIResourceList, -}; +pub use self::api_resource_list::APIResourceList; mod api_versions; -pub use self::api_versions::{ - APIVersions, -}; +pub use self::api_versions::APIVersions; mod delete_options; -pub use self::delete_options::{ - DeleteOptions, -}; +pub use self::delete_options::DeleteOptions; mod group_version_for_discovery; -pub use self::group_version_for_discovery::{ - GroupVersionForDiscovery, -}; +pub use self::group_version_for_discovery::GroupVersionForDiscovery; mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializers; -pub use self::initializers::{ - Initializers, -}; +pub use self::initializers::Initializers; mod label_selector; -pub use self::label_selector::{ - LabelSelector, -}; +pub use self::label_selector::LabelSelector; mod label_selector_requirement; -pub use self::label_selector_requirement::{ - LabelSelectorRequirement, -}; +pub use self::label_selector_requirement::LabelSelectorRequirement; mod list_meta; -pub use self::list_meta::{ - ListMeta, -}; +pub use self::list_meta::ListMeta; mod object_meta; -pub use self::object_meta::{ - ObjectMeta, -}; +pub use self::object_meta::ObjectMeta; mod owner_reference; -pub use self::owner_reference::{ - OwnerReference, -}; +pub use self::owner_reference::OwnerReference; mod patch; -pub use self::patch::{ - Patch, -}; +pub use self::patch::Patch; mod preconditions; -pub use self::preconditions::{ - Preconditions, -}; +pub use self::preconditions::Preconditions; mod server_address_by_client_cidr; -pub use self::server_address_by_client_cidr::{ - ServerAddressByClientCIDR, -}; +pub use self::server_address_by_client_cidr::ServerAddressByClientCIDR; mod status; -pub use self::status::{ - Status, -}; +pub use self::status::Status; mod status_cause; -pub use self::status_cause::{ - StatusCause, -}; +pub use self::status_cause::StatusCause; mod status_details; -pub use self::status_details::{ - StatusDetails, -}; +pub use self::status_details::StatusDetails; mod time; -pub use self::time::{ - Time, -}; +pub use self::time::Time; mod watch_event; -pub use self::watch_event::{ - WatchEvent, -}; +pub use self::watch_event::WatchEvent; diff --git a/src/v1_8/apimachinery/pkg/runtime/mod.rs b/src/v1_8/apimachinery/pkg/runtime/mod.rs index 8614e1a158..eb2b8c0503 100644 --- a/src/v1_8/apimachinery/pkg/runtime/mod.rs +++ b/src/v1_8/apimachinery/pkg/runtime/mod.rs @@ -1,5 +1,3 @@ mod raw_extension; -pub use self::raw_extension::{ - RawExtension, -}; +pub use self::raw_extension::RawExtension; diff --git a/src/v1_8/apimachinery/pkg/util/intstr/mod.rs b/src/v1_8/apimachinery/pkg/util/intstr/mod.rs index 0d14f602e5..d3f7196121 100644 --- a/src/v1_8/apimachinery/pkg/util/intstr/mod.rs +++ b/src/v1_8/apimachinery/pkg/util/intstr/mod.rs @@ -1,5 +1,3 @@ mod int_or_string; -pub use self::int_or_string::{ - IntOrString, -}; +pub use self::int_or_string::IntOrString; diff --git a/src/v1_8/apimachinery/pkg/version/mod.rs b/src/v1_8/apimachinery/pkg/version/mod.rs index 540fa68d40..f125e577d1 100644 --- a/src/v1_8/apimachinery/pkg/version/mod.rs +++ b/src/v1_8/apimachinery/pkg/version/mod.rs @@ -1,5 +1,3 @@ mod info; -pub use self::info::{ - Info, -}; +pub use self::info::Info; diff --git a/src/v1_8/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs b/src/v1_8/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs index c8b2dd8bdd..70aaa6a6b7 100644 --- a/src/v1_8/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs +++ b/src/v1_8/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_8::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -53,6 +54,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,12 +62,14 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_8::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -111,6 +115,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_8::DeleteOptional<'_>, @@ -130,6 +135,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -137,6 +143,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -195,6 +202,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_8::DeleteOptional<'_>, list_optional: crate::v1_8::ListOptional<'_>, @@ -215,6 +223,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_8::apimachinery::pkg::apis::meta::v1::Status), @@ -222,6 +231,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -278,6 +288,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_8::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -296,12 +307,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_8::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -349,6 +362,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_8::apimachinery::pkg::apis::meta::v1::Patch, @@ -376,12 +390,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_8::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -427,6 +443,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -461,6 +478,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -472,12 +490,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_8::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -525,6 +545,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_8::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -553,6 +574,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -560,12 +582,14 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_8::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -613,6 +637,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_8::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -641,6 +666,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -648,12 +674,14 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_8::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -697,6 +725,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_8::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -715,12 +744,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_8/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs b/src/v1_8/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs index 9eb26431b5..33741c4264 100644 --- a/src/v1_8/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs +++ b/src/v1_8/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs @@ -1,39 +1,27 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_8/mod.rs b/src/v1_8/mod.rs index 2339286cca..ecf117b55f 100644 --- a/src/v1_8/mod.rs +++ b/src/v1_8/mod.rs @@ -1,23 +1,15 @@ mod delete_optional; -pub use self::delete_optional::{ - DeleteOptional, -}; +pub use self::delete_optional::DeleteOptional; mod list_optional; -pub use self::list_optional::{ - ListOptional, -}; +pub use self::list_optional::ListOptional; mod patch_optional; -pub use self::patch_optional::{ - PatchOptional, -}; +pub use self::patch_optional::PatchOptional; mod watch_optional; -pub use self::watch_optional::{ - WatchOptional, -}; +pub use self::watch_optional::WatchOptional; pub mod api; @@ -32,6 +24,7 @@ pub mod kube_aggregator; /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAPIVersionsResponse`]`>` constructor, or [`GetAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/".to_owned(); @@ -45,12 +38,14 @@ pub fn get_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAPIVersionsResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroupList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -85,6 +80,7 @@ impl crate::Response for GetAPIVersionsResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationAPIGroupResponse`]`>` constructor, or [`GetAdmissionregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/".to_owned(); @@ -98,12 +94,14 @@ pub fn get_admissionregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +136,7 @@ impl crate::Response for GetAdmissionregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1alpha1/".to_owned(); @@ -151,12 +150,14 @@ pub fn get_admissionregistration_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1alpha1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -191,6 +192,7 @@ impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsAPIGroupResponse`]`>` constructor, or [`GetApiextensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/".to_owned(); @@ -204,12 +206,14 @@ pub fn get_apiextensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +248,7 @@ impl crate::Response for GetApiextensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiextensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/v1beta1/".to_owned(); @@ -257,12 +262,14 @@ pub fn get_apiextensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsV1beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +304,7 @@ impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationAPIGroupResponse`]`>` constructor, or [`GetApiregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/".to_owned(); @@ -310,12 +318,14 @@ pub fn get_apiregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +360,7 @@ impl crate::Response for GetApiregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1beta1/".to_owned(); @@ -363,12 +374,14 @@ pub fn get_apiregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -403,6 +416,7 @@ impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsAPIGroupResponse`]`>` constructor, or [`GetAppsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/".to_owned(); @@ -416,12 +430,14 @@ pub fn get_apps_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -456,6 +472,7 @@ impl crate::Response for GetAppsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta1APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta1/".to_owned(); @@ -469,12 +486,14 @@ pub fn get_apps_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -509,6 +528,7 @@ impl crate::Response for GetAppsV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta2APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta2/".to_owned(); @@ -522,12 +542,14 @@ pub fn get_apps_v1beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta2APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +584,7 @@ impl crate::Response for GetAppsV1beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationAPIGroupResponse`]`>` constructor, or [`GetAuthenticationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/".to_owned(); @@ -575,12 +598,14 @@ pub fn get_authentication_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -615,6 +640,7 @@ impl crate::Response for GetAuthenticationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1/".to_owned(); @@ -628,12 +654,14 @@ pub fn get_authentication_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +696,7 @@ impl crate::Response for GetAuthenticationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1beta1/".to_owned(); @@ -681,12 +710,14 @@ pub fn get_authentication_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -721,6 +752,7 @@ impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationAPIGroupResponse`]`>` constructor, or [`GetAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/".to_owned(); @@ -734,12 +766,14 @@ pub fn get_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +808,7 @@ impl crate::Response for GetAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1/".to_owned(); @@ -787,12 +822,14 @@ pub fn get_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -827,6 +864,7 @@ impl crate::Response for GetAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1beta1/".to_owned(); @@ -840,12 +878,14 @@ pub fn get_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -880,6 +920,7 @@ impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingAPIGroupResponse`]`>` constructor, or [`GetAutoscalingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/".to_owned(); @@ -893,12 +934,14 @@ pub fn get_autoscaling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +976,7 @@ impl crate::Response for GetAutoscalingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v1/".to_owned(); @@ -946,12 +990,14 @@ pub fn get_autoscaling_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -986,6 +1032,7 @@ impl crate::Response for GetAutoscalingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta1/".to_owned(); @@ -999,12 +1046,14 @@ pub fn get_autoscaling_v2beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1039,6 +1088,7 @@ impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchAPIGroupResponse`]`>` constructor, or [`GetBatchAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/".to_owned(); @@ -1052,12 +1102,14 @@ pub fn get_batch_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1092,6 +1144,7 @@ impl crate::Response for GetBatchAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1APIResourcesResponse`]`>` constructor, or [`GetBatchV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1/".to_owned(); @@ -1105,12 +1158,14 @@ pub fn get_batch_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1145,6 +1200,7 @@ impl crate::Response for GetBatchV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1beta1APIResourcesResponse`]`>` constructor, or [`GetBatchV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1beta1/".to_owned(); @@ -1158,12 +1214,14 @@ pub fn get_batch_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1198,6 +1256,7 @@ impl crate::Response for GetBatchV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV2alpha1APIResourcesResponse`]`>` constructor, or [`GetBatchV2alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v2alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v2alpha1/".to_owned(); @@ -1211,12 +1270,14 @@ pub fn get_batch_v2alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v2alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV2alpha1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV2alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1251,6 +1312,7 @@ impl crate::Response for GetBatchV2alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesAPIGroupResponse`]`>` constructor, or [`GetCertificatesAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/".to_owned(); @@ -1264,12 +1326,14 @@ pub fn get_certificates_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1304,6 +1368,7 @@ impl crate::Response for GetCertificatesAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesV1beta1APIResourcesResponse`]`>` constructor, or [`GetCertificatesV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/v1beta1/".to_owned(); @@ -1317,12 +1382,14 @@ pub fn get_certificates_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesV1beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1357,6 +1424,7 @@ impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { /// get the code version /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCodeVersionResponse`]`>` constructor, or [`GetCodeVersionResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_code_version( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/version/".to_owned(); @@ -1370,12 +1438,14 @@ pub fn get_code_version( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_code_version`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCodeVersionResponse { Ok(crate::v1_8::apimachinery::pkg::version::Info), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCodeVersionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1410,6 +1480,7 @@ impl crate::Response for GetCodeVersionResponse { /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreAPIVersionsResponse`]`>` constructor, or [`GetCoreAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/".to_owned(); @@ -1423,12 +1494,14 @@ pub fn get_core_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreAPIVersionsResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIVersions), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1463,6 +1536,7 @@ impl crate::Response for GetCoreAPIVersionsResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreV1APIResourcesResponse`]`>` constructor, or [`GetCoreV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/v1/".to_owned(); @@ -1476,12 +1550,14 @@ pub fn get_core_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreV1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1516,6 +1592,7 @@ impl crate::Response for GetCoreV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsAPIGroupResponse`]`>` constructor, or [`GetExtensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/".to_owned(); @@ -1529,12 +1606,14 @@ pub fn get_extensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1569,6 +1648,7 @@ impl crate::Response for GetExtensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetExtensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/v1beta1/".to_owned(); @@ -1582,12 +1662,14 @@ pub fn get_extensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsV1beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1622,6 +1704,7 @@ impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingAPIGroupResponse`]`>` constructor, or [`GetNetworkingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/".to_owned(); @@ -1635,12 +1718,14 @@ pub fn get_networking_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1675,6 +1760,7 @@ impl crate::Response for GetNetworkingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingV1APIResourcesResponse`]`>` constructor, or [`GetNetworkingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/v1/".to_owned(); @@ -1688,12 +1774,14 @@ pub fn get_networking_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingV1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1728,6 +1816,7 @@ impl crate::Response for GetNetworkingV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyAPIGroupResponse`]`>` constructor, or [`GetPolicyAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/".to_owned(); @@ -1741,12 +1830,14 @@ pub fn get_policy_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1781,6 +1872,7 @@ impl crate::Response for GetPolicyAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyV1beta1APIResourcesResponse`]`>` constructor, or [`GetPolicyV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/v1beta1/".to_owned(); @@ -1794,12 +1886,14 @@ pub fn get_policy_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyV1beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1834,6 +1928,7 @@ impl crate::Response for GetPolicyV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationAPIGroupResponse`]`>` constructor, or [`GetRbacAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/".to_owned(); @@ -1847,12 +1942,14 @@ pub fn get_rbac_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1887,6 +1984,7 @@ impl crate::Response for GetRbacAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1/".to_owned(); @@ -1900,12 +1998,14 @@ pub fn get_rbac_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1940,6 +2040,7 @@ impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1alpha1/".to_owned(); @@ -1953,12 +2054,14 @@ pub fn get_rbac_authorization_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1alpha1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1993,6 +2096,7 @@ impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1beta1/".to_owned(); @@ -2006,12 +2110,14 @@ pub fn get_rbac_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2046,6 +2152,7 @@ impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingAPIGroupResponse`]`>` constructor, or [`GetSchedulingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/".to_owned(); @@ -2059,12 +2166,14 @@ pub fn get_scheduling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2099,6 +2208,7 @@ impl crate::Response for GetSchedulingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1alpha1/".to_owned(); @@ -2112,12 +2222,14 @@ pub fn get_scheduling_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1alpha1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2152,6 +2264,7 @@ impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsAPIGroupResponse`]`>` constructor, or [`GetSettingsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/".to_owned(); @@ -2165,12 +2278,14 @@ pub fn get_settings_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2205,6 +2320,7 @@ impl crate::Response for GetSettingsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSettingsV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/v1alpha1/".to_owned(); @@ -2218,12 +2334,14 @@ pub fn get_settings_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsV1alpha1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2258,6 +2376,7 @@ impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageAPIGroupResponse`]`>` constructor, or [`GetStorageAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/".to_owned(); @@ -2271,12 +2390,14 @@ pub fn get_storage_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageAPIGroupResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2311,6 +2432,7 @@ impl crate::Response for GetStorageAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1APIResourcesResponse`]`>` constructor, or [`GetStorageV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1/".to_owned(); @@ -2324,12 +2446,14 @@ pub fn get_storage_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2364,6 +2488,7 @@ impl crate::Response for GetStorageV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1beta1APIResourcesResponse`]`>` constructor, or [`GetStorageV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1beta1/".to_owned(); @@ -2377,12 +2502,14 @@ pub fn get_storage_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1beta1APIResourcesResponse { Ok(crate::v1_8::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2421,6 +2548,7 @@ impl crate::Response for GetStorageV1beta1APIResourcesResponse { /// * `logpath` /// /// path to the log +#[cfg(feature = "api")] pub fn log_file_handler( logpath: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2437,11 +2565,13 @@ pub fn log_file_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2466,6 +2596,7 @@ impl crate::Response for LogFileHandlerResponse { // Generated from operation logFileListHandler /// Use the returned [`crate::ResponseBody`]`<`[`LogFileListHandlerResponse`]`>` constructor, or [`LogFileListHandlerResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn log_file_list_handler( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/logs/".to_owned(); @@ -2479,11 +2610,13 @@ pub fn log_file_list_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_list_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileListHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileListHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/admissionregistration/v1alpha1/initializer_configuration.rs b/src/v1_9/api/admissionregistration/v1alpha1/initializer_configuration.rs index fac6f3318e..8c1e0685f9 100644 --- a/src/v1_9/api/admissionregistration/v1alpha1/initializer_configuration.rs +++ b/src/v1_9/api/admissionregistration/v1alpha1/initializer_configuration.rs @@ -26,6 +26,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_initializer_configuration( body: &crate::v1_9::api::admissionregistration::v1alpha1::InitializerConfiguration, optional: CreateInitializerConfigurationOptional<'_>, @@ -51,6 +52,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateInitializerConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreateInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::create_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateInitializerConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1alpha1::InitializerConfiguration), @@ -66,6 +69,7 @@ pub enum CreateInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl InitializerConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_initializer_configuration( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -147,6 +152,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_collection_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionInitializerConfigurationResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_initializer_configuration( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::delete_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteInitializerConfigurationResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeleteInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_initializer_configuration( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::list_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListInitializerConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1alpha1::InitializerConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_initializer_configuration( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::patch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchInitializerConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_initializer_configuration( name: &str, optional: ReadInitializerConfigurationOptional<'_>, @@ -477,6 +494,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadInitializerConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::read_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadInitializerConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1alpha1::InitializerConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_initializer_configuration( name: &str, body: &crate::v1_9::api::admissionregistration::v1alpha1::InitializerConfiguration, @@ -569,6 +590,7 @@ impl InitializerConfiguration { } /// Optional parameters of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceInitializerConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplaceInitializerConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::replace_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceInitializerConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1alpha1::InitializerConfiguration), @@ -583,6 +606,7 @@ pub enum ReplaceInitializerConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl InitializerConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_initializer_configuration( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl InitializerConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`InitializerConfiguration::watch_initializer_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchInitializerConfigurationResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchInitializerConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/admissionregistration/v1alpha1/mod.rs b/src/v1_9/api/admissionregistration/v1alpha1/mod.rs index b1ef774c7b..2657f18e2f 100644 --- a/src/v1_9/api/admissionregistration/v1alpha1/mod.rs +++ b/src/v1_9/api/admissionregistration/v1alpha1/mod.rs @@ -1,28 +1,20 @@ mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializer_configuration; -pub use self::initializer_configuration::{ - InitializerConfiguration, - CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse, - DeleteCollectionInitializerConfigurationResponse, - DeleteInitializerConfigurationResponse, - ListInitializerConfigurationResponse, - PatchInitializerConfigurationResponse, - ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse, - ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse, - WatchInitializerConfigurationResponse, -}; +pub use self::initializer_configuration::InitializerConfiguration; +#[cfg(feature = "api")] pub use self::initializer_configuration::{CreateInitializerConfigurationOptional, CreateInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteCollectionInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::DeleteInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::ListInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::PatchInitializerConfigurationResponse; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReadInitializerConfigurationOptional, ReadInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::{ReplaceInitializerConfigurationOptional, ReplaceInitializerConfigurationResponse}; +#[cfg(feature = "api")] pub use self::initializer_configuration::WatchInitializerConfigurationResponse; mod initializer_configuration_list; -pub use self::initializer_configuration_list::{ - InitializerConfigurationList, -}; +pub use self::initializer_configuration_list::InitializerConfigurationList; mod rule; -pub use self::rule::{ - Rule, -}; +pub use self::rule::Rule; diff --git a/src/v1_9/api/admissionregistration/v1beta1/mod.rs b/src/v1_9/api/admissionregistration/v1beta1/mod.rs index 9e4dd8f5a8..7dd5906135 100644 --- a/src/v1_9/api/admissionregistration/v1beta1/mod.rs +++ b/src/v1_9/api/admissionregistration/v1beta1/mod.rs @@ -1,56 +1,40 @@ mod mutating_webhook_configuration; -pub use self::mutating_webhook_configuration::{ - MutatingWebhookConfiguration, - CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse, - DeleteCollectionMutatingWebhookConfigurationResponse, - DeleteMutatingWebhookConfigurationResponse, - ListMutatingWebhookConfigurationResponse, - PatchMutatingWebhookConfigurationResponse, - ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse, - ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse, - WatchMutatingWebhookConfigurationResponse, -}; +pub use self::mutating_webhook_configuration::MutatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{CreateMutatingWebhookConfigurationOptional, CreateMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteCollectionMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::DeleteMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::ListMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::PatchMutatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReadMutatingWebhookConfigurationOptional, ReadMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::{ReplaceMutatingWebhookConfigurationOptional, ReplaceMutatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::mutating_webhook_configuration::WatchMutatingWebhookConfigurationResponse; mod mutating_webhook_configuration_list; -pub use self::mutating_webhook_configuration_list::{ - MutatingWebhookConfigurationList, -}; +pub use self::mutating_webhook_configuration_list::MutatingWebhookConfigurationList; mod rule_with_operations; -pub use self::rule_with_operations::{ - RuleWithOperations, -}; +pub use self::rule_with_operations::RuleWithOperations; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; mod validating_webhook_configuration; -pub use self::validating_webhook_configuration::{ - ValidatingWebhookConfiguration, - CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse, - DeleteCollectionValidatingWebhookConfigurationResponse, - DeleteValidatingWebhookConfigurationResponse, - ListValidatingWebhookConfigurationResponse, - PatchValidatingWebhookConfigurationResponse, - ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse, - ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse, - WatchValidatingWebhookConfigurationResponse, -}; +pub use self::validating_webhook_configuration::ValidatingWebhookConfiguration; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{CreateValidatingWebhookConfigurationOptional, CreateValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteCollectionValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::DeleteValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::ListValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::PatchValidatingWebhookConfigurationResponse; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReadValidatingWebhookConfigurationOptional, ReadValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::{ReplaceValidatingWebhookConfigurationOptional, ReplaceValidatingWebhookConfigurationResponse}; +#[cfg(feature = "api")] pub use self::validating_webhook_configuration::WatchValidatingWebhookConfigurationResponse; mod validating_webhook_configuration_list; -pub use self::validating_webhook_configuration_list::{ - ValidatingWebhookConfigurationList, -}; +pub use self::validating_webhook_configuration_list::ValidatingWebhookConfigurationList; mod webhook; -pub use self::webhook::{ - Webhook, -}; +pub use self::webhook::Webhook; mod webhook_client_config; -pub use self::webhook_client_config::{ - WebhookClientConfig, -}; +pub use self::webhook_client_config::WebhookClientConfig; diff --git a/src/v1_9/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs b/src/v1_9/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs index 1e4444c509..deaadc5cc0 100644 --- a/src/v1_9/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs +++ b/src/v1_9/api/admissionregistration/v1beta1/mutating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_mutating_webhook_configuration( body: &crate::v1_9::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, optional: CreateMutatingWebhookConfigurationOptional<'_>, @@ -51,6 +52,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateMutatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreateMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::create_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateMutatingWebhookConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -66,6 +69,7 @@ pub enum CreateMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl MutatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_mutating_webhook_configuration( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -147,6 +152,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_collection_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionMutatingWebhookConfigurationResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_mutating_webhook_configuration( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::delete_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteMutatingWebhookConfigurationResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeleteMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_mutating_webhook_configuration( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::list_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListMutatingWebhookConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1beta1::MutatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_mutating_webhook_configuration( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::patch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchMutatingWebhookConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_mutating_webhook_configuration( name: &str, optional: ReadMutatingWebhookConfigurationOptional<'_>, @@ -477,6 +494,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadMutatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::read_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadMutatingWebhookConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_mutating_webhook_configuration( name: &str, body: &crate::v1_9::api::admissionregistration::v1beta1::MutatingWebhookConfiguration, @@ -569,6 +590,7 @@ impl MutatingWebhookConfiguration { } /// Optional parameters of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplaceMutatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::replace_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceMutatingWebhookConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1beta1::MutatingWebhookConfiguration), @@ -583,6 +606,7 @@ pub enum ReplaceMutatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl MutatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_mutating_webhook_configuration( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl MutatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`MutatingWebhookConfiguration::watch_mutating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchMutatingWebhookConfigurationResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchMutatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/admissionregistration/v1beta1/validating_webhook_configuration.rs b/src/v1_9/api/admissionregistration/v1beta1/validating_webhook_configuration.rs index adc5cbc0d5..5011866a68 100644 --- a/src/v1_9/api/admissionregistration/v1beta1/validating_webhook_configuration.rs +++ b/src/v1_9/api/admissionregistration/v1beta1/validating_webhook_configuration.rs @@ -26,6 +26,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_validating_webhook_configuration( body: &crate::v1_9::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, optional: CreateValidatingWebhookConfigurationOptional<'_>, @@ -51,6 +52,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateValidatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreateValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::create_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateValidatingWebhookConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -66,6 +69,7 @@ pub enum CreateValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl ValidatingWebhookConfiguration { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_validating_webhook_configuration( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -147,6 +152,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_collection_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionValidatingWebhookConfigurationResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_validating_webhook_configuration( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::delete_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteValidatingWebhookConfigurationResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeleteValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_validating_webhook_configuration( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::list_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListValidatingWebhookConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1beta1::ValidatingWebhookConfigurationList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_validating_webhook_configuration( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::patch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchValidatingWebhookConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_validating_webhook_configuration( name: &str, optional: ReadValidatingWebhookConfigurationOptional<'_>, @@ -477,6 +494,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadValidatingWebhookConfigurationOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::read_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadValidatingWebhookConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_validating_webhook_configuration( name: &str, body: &crate::v1_9::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration, @@ -569,6 +590,7 @@ impl ValidatingWebhookConfiguration { } /// Optional parameters of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplaceValidatingWebhookConfigurationOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::replace_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceValidatingWebhookConfigurationResponse { Ok(crate::v1_9::api::admissionregistration::v1beta1::ValidatingWebhookConfiguration), @@ -583,6 +606,7 @@ pub enum ReplaceValidatingWebhookConfigurationResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl ValidatingWebhookConfiguration { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_validating_webhook_configuration( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl ValidatingWebhookConfiguration { } /// Use `::try_from_parts` to parse the HTTP response body of [`ValidatingWebhookConfiguration::watch_validating_webhook_configuration`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchValidatingWebhookConfigurationResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchValidatingWebhookConfigurationResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1/controller_revision.rs b/src/v1_9/api/apps/v1/controller_revision.rs index c264d1c1c7..addf495923 100644 --- a/src/v1_9/api/apps/v1/controller_revision.rs +++ b/src/v1_9/api/apps/v1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_9::api::apps::v1::ControllerRevision, @@ -61,6 +62,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1::ControllerRevision), @@ -76,6 +79,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,6 +716,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1::ControllerRevision), @@ -698,6 +724,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -767,12 +795,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -843,12 +874,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1/daemon_set.rs b/src/v1_9/api/apps/v1/daemon_set.rs index 72331e16ce..fc18c13648 100644 --- a/src/v1_9/api/apps/v1/daemon_set.rs +++ b/src/v1_9/api/apps/v1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_9::api::apps::v1::DaemonSet, @@ -61,6 +62,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_9::api::apps::v1::DaemonSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_9::api::apps::v1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_9::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_9::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_9::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_9::api::apps::v1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_9::api::apps::v1::DaemonSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_9::api::apps::v1::DaemonSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1/deployment.rs b/src/v1_9/api/apps/v1/deployment.rs index 0442a98e9b..96759bc7a0 100644 --- a/src/v1_9/api/apps/v1/deployment.rs +++ b/src/v1_9/api/apps/v1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_9::api::apps::v1::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::apps::v1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::apps::v1::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1/mod.rs b/src/v1_9/api/apps/v1/mod.rs index a25b916f02..971a3fb358 100644 --- a/src/v1_9/api/apps/v1/mod.rs +++ b/src/v1_9/api/apps/v1/mod.rs @@ -1,202 +1,146 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_9/api/apps/v1/replica_set.rs b/src/v1_9/api/apps/v1/replica_set.rs index 8e12fdd71b..be8d2bf301 100644 --- a/src/v1_9/api/apps/v1/replica_set.rs +++ b/src/v1_9/api/apps/v1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_9::api::apps::v1::ReplicaSet, @@ -61,6 +62,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_9::api::apps::v1::ReplicaSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_9::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_9::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_9::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_9::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_9::api::apps::v1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_9::api::apps::v1::ReplicaSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_9::api::apps::v1::ReplicaSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1/stateful_set.rs b/src/v1_9/api/apps/v1/stateful_set.rs index db13e5cddb..ad3a2531e9 100644 --- a/src/v1_9/api/apps/v1/stateful_set.rs +++ b/src/v1_9/api/apps/v1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_9::api::apps::v1::StatefulSet, @@ -63,6 +64,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -70,6 +72,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1::StatefulSet), @@ -78,6 +81,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -143,6 +147,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -166,6 +171,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -173,6 +179,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -256,6 +264,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -263,6 +272,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -323,6 +333,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -344,12 +355,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -393,6 +406,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -411,12 +425,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -497,12 +514,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -554,6 +573,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -583,12 +603,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_9::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -638,6 +660,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -674,6 +697,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -685,12 +709,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -740,6 +766,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -768,6 +795,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -775,12 +803,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_9::api::apps::v1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -832,6 +862,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -862,6 +893,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -869,6 +901,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1::StatefulSet), @@ -876,6 +909,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -935,6 +969,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -965,6 +1000,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -972,6 +1008,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_9::api::apps::v1::StatefulSet), @@ -979,6 +1016,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1034,6 +1072,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1055,12 +1094,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1106,6 +1147,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1124,12 +1166,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1beta1/controller_revision.rs b/src/v1_9/api/apps/v1beta1/controller_revision.rs index 2c4c8a2f59..9ad4385d78 100644 --- a/src/v1_9/api/apps/v1beta1/controller_revision.rs +++ b/src/v1_9/api/apps/v1beta1/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_9::api::apps::v1beta1::ControllerRevision, @@ -61,6 +62,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1beta1::ControllerRevision), @@ -76,6 +79,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1beta1::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1beta1::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,6 +716,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1beta1::ControllerRevision), @@ -698,6 +724,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -767,12 +795,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -843,12 +874,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1beta1/deployment.rs b/src/v1_9/api/apps/v1beta1/deployment.rs index 0914656bd2..f2dd446dce 100644 --- a/src/v1_9/api/apps/v1beta1/deployment.rs +++ b/src/v1_9/api/apps/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_9::api::apps::v1beta1::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1beta1::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::apps::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1beta1::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::apps::v1beta1::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1beta1/deployment_rollback.rs b/src/v1_9/api/apps/v1beta1/deployment_rollback.rs index e2cf7c17ca..3d26b7315f 100644 --- a/src/v1_9/api/apps/v1beta1/deployment_rollback.rs +++ b/src/v1_9/api/apps/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -67,6 +68,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// If 'true', then the output is pretty printed. @@ -74,6 +76,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -82,6 +85,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1beta1/mod.rs b/src/v1_9/api/apps/v1beta1/mod.rs index 93facd2f47..94ca19493a 100644 --- a/src/v1_9/api/apps/v1beta1/mod.rs +++ b/src/v1_9/api/apps/v1beta1/mod.rs @@ -1,148 +1,106 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_9/api/apps/v1beta1/scale.rs b/src/v1_9/api/apps/v1beta1/scale.rs index 35bdec3dc9..bf892d310b 100644 --- a/src/v1_9/api/apps/v1beta1/scale.rs +++ b/src/v1_9/api/apps/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_9::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -207,6 +213,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -235,6 +242,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -242,12 +250,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -325,6 +336,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -332,12 +344,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_9::api::apps::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -389,6 +403,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -419,6 +434,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -426,6 +442,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::apps::v1beta1::Scale), @@ -433,6 +450,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -492,6 +510,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -522,6 +541,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -529,6 +549,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_9::api::apps::v1beta1::Scale), @@ -536,6 +557,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1beta1/stateful_set.rs b/src/v1_9/api/apps/v1beta1/stateful_set.rs index af864cefb0..4e6cdac811 100644 --- a/src/v1_9/api/apps/v1beta1/stateful_set.rs +++ b/src/v1_9/api/apps/v1beta1/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_9::api::apps::v1beta1::StatefulSet, @@ -63,6 +64,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -70,6 +72,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1beta1::StatefulSet), @@ -78,6 +81,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -143,6 +147,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -166,6 +171,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -173,6 +179,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -256,6 +264,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -263,6 +272,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -323,6 +333,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -344,12 +355,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -393,6 +406,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -411,12 +425,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1beta1::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -497,12 +514,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -554,6 +573,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -583,12 +603,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -638,6 +660,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -674,6 +697,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -685,12 +709,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -740,6 +766,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -768,6 +795,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -775,12 +803,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta1::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -832,6 +862,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -862,6 +893,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -869,6 +901,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1beta1::StatefulSet), @@ -876,6 +909,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -935,6 +969,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -965,6 +1000,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -972,6 +1008,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta1::StatefulSet), @@ -979,6 +1016,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1034,6 +1072,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1055,12 +1094,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1106,6 +1147,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1124,12 +1166,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1beta2/controller_revision.rs b/src/v1_9/api/apps/v1beta2/controller_revision.rs index 0d6a1151b1..64c4a61cfa 100644 --- a/src/v1_9/api/apps/v1beta2/controller_revision.rs +++ b/src/v1_9/api/apps/v1beta2/controller_revision.rs @@ -33,6 +33,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_controller_revision( namespace: &str, body: &crate::v1_9::api::apps::v1beta2::ControllerRevision, @@ -61,6 +62,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::create_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1beta2::ControllerRevision), @@ -76,6 +79,7 @@ pub enum CreateNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ControllerRevision { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_controller_revision( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_collection_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedControllerRevisionResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_controller_revision( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::delete_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedControllerRevisionResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_controller_revision_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListControllerRevisionForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_controller_revision( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::list_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1beta2::ControllerRevisionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_controller_revision( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::patch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_controller_revision( name: &str, namespace: &str, @@ -586,6 +606,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedControllerRevisionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -597,12 +618,14 @@ pub struct ReadNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::read_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1beta2::ControllerRevision), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -654,6 +677,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_controller_revision( name: &str, namespace: &str, @@ -684,6 +708,7 @@ impl ControllerRevision { } /// Optional parameters of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedControllerRevisionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -691,6 +716,7 @@ pub struct ReplaceNamespacedControllerRevisionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::replace_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedControllerRevisionResponse { Ok(crate::v1_9::api::apps::v1beta2::ControllerRevision), @@ -698,6 +724,7 @@ pub enum ReplaceNamespacedControllerRevisionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -749,6 +776,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_controller_revision_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -767,12 +795,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_controller_revision_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchControllerRevisionForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchControllerRevisionForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl ControllerRevision { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_controller_revision( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -843,12 +874,14 @@ impl ControllerRevision { } /// Use `::try_from_parts` to parse the HTTP response body of [`ControllerRevision::watch_namespaced_controller_revision`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedControllerRevisionResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedControllerRevisionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1beta2/daemon_set.rs b/src/v1_9/api/apps/v1beta2/daemon_set.rs index 7b169fee54..d217bd0488 100644 --- a/src/v1_9/api/apps/v1beta2/daemon_set.rs +++ b/src/v1_9/api/apps/v1beta2/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_9::api::apps::v1beta2::DaemonSet, @@ -61,6 +62,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_9::api::apps::v1beta2::DaemonSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_9::api::apps::v1beta2::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_9::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_9::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_9::api::apps::v1beta2::DaemonSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::DaemonSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1beta2/deployment.rs b/src/v1_9/api/apps/v1beta2/deployment.rs index 4f3a9589da..59d75e90f6 100644 --- a/src/v1_9/api/apps/v1beta2/deployment.rs +++ b/src/v1_9/api/apps/v1beta2/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_9::api::apps::v1beta2::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1beta2::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1beta2::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_9::api::apps::v1beta2::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1beta2/mod.rs b/src/v1_9/api/apps/v1beta2/mod.rs index a95884f4d6..60c611aefd 100644 --- a/src/v1_9/api/apps/v1beta2/mod.rs +++ b/src/v1_9/api/apps/v1beta2/mod.rs @@ -1,226 +1,164 @@ mod controller_revision; -pub use self::controller_revision::{ - ControllerRevision, - CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse, - DeleteCollectionNamespacedControllerRevisionResponse, - DeleteNamespacedControllerRevisionResponse, - ListControllerRevisionForAllNamespacesResponse, - ListNamespacedControllerRevisionResponse, - PatchNamespacedControllerRevisionResponse, - ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse, - ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse, - WatchControllerRevisionForAllNamespacesResponse, - WatchNamespacedControllerRevisionResponse, -}; +pub use self::controller_revision::ControllerRevision; +#[cfg(feature = "api")] pub use self::controller_revision::{CreateNamespacedControllerRevisionOptional, CreateNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteCollectionNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::DeleteNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::ListNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::PatchNamespacedControllerRevisionResponse; +#[cfg(feature = "api")] pub use self::controller_revision::{ReadNamespacedControllerRevisionOptional, ReadNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::{ReplaceNamespacedControllerRevisionOptional, ReplaceNamespacedControllerRevisionResponse}; +#[cfg(feature = "api")] pub use self::controller_revision::WatchControllerRevisionForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::controller_revision::WatchNamespacedControllerRevisionResponse; mod controller_revision_list; -pub use self::controller_revision_list::{ - ControllerRevisionList, -}; +pub use self::controller_revision_list::ControllerRevisionList; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod rolling_update_stateful_set_strategy; -pub use self::rolling_update_stateful_set_strategy::{ - RollingUpdateStatefulSetStrategy, -}; +pub use self::rolling_update_stateful_set_strategy::RollingUpdateStatefulSetStrategy; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod stateful_set; -pub use self::stateful_set::{ - StatefulSet, - CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse, - DeleteCollectionNamespacedStatefulSetResponse, - DeleteNamespacedStatefulSetResponse, - ListNamespacedStatefulSetResponse, - ListStatefulSetForAllNamespacesResponse, - PatchNamespacedStatefulSetResponse, - PatchNamespacedStatefulSetStatusResponse, - ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse, - ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse, - ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse, - ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse, - WatchNamespacedStatefulSetResponse, - WatchStatefulSetForAllNamespacesResponse, -}; +pub use self::stateful_set::StatefulSet; +#[cfg(feature = "api")] pub use self::stateful_set::{CreateNamespacedStatefulSetOptional, CreateNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteCollectionNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::DeleteNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::ListStatefulSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::PatchNamespacedStatefulSetStatusResponse; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetOptional, ReadNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReadNamespacedStatefulSetStatusOptional, ReadNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetOptional, ReplaceNamespacedStatefulSetResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::{ReplaceNamespacedStatefulSetStatusOptional, ReplaceNamespacedStatefulSetStatusResponse}; +#[cfg(feature = "api")] pub use self::stateful_set::WatchNamespacedStatefulSetResponse; +#[cfg(feature = "api")] pub use self::stateful_set::WatchStatefulSetForAllNamespacesResponse; mod stateful_set_condition; -pub use self::stateful_set_condition::{ - StatefulSetCondition, -}; +pub use self::stateful_set_condition::StatefulSetCondition; mod stateful_set_list; -pub use self::stateful_set_list::{ - StatefulSetList, -}; +pub use self::stateful_set_list::StatefulSetList; mod stateful_set_spec; -pub use self::stateful_set_spec::{ - StatefulSetSpec, -}; +pub use self::stateful_set_spec::StatefulSetSpec; mod stateful_set_status; -pub use self::stateful_set_status::{ - StatefulSetStatus, -}; +pub use self::stateful_set_status::StatefulSetStatus; mod stateful_set_update_strategy; -pub use self::stateful_set_update_strategy::{ - StatefulSetUpdateStrategy, -}; +pub use self::stateful_set_update_strategy::StatefulSetUpdateStrategy; diff --git a/src/v1_9/api/apps/v1beta2/replica_set.rs b/src/v1_9/api/apps/v1beta2/replica_set.rs index 602abfb760..72d85e5380 100644 --- a/src/v1_9/api/apps/v1beta2/replica_set.rs +++ b/src/v1_9/api/apps/v1beta2/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_9::api::apps::v1beta2::ReplicaSet, @@ -61,6 +62,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_9::api::apps::v1beta2::ReplicaSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_9::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1beta2::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_9::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_9::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_9::api::apps::v1beta2::ReplicaSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::ReplicaSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1beta2/scale.rs b/src/v1_9/api/apps/v1beta2/scale.rs index 61ba758efe..3b4a9863d5 100644 --- a/src/v1_9/api/apps/v1beta2/scale.rs +++ b/src/v1_9/api/apps/v1beta2/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_9::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_9::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_9::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_9::api::apps::v1beta2::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -595,6 +617,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -602,6 +625,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::apps::v1beta2::Scale), @@ -609,6 +633,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +693,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -698,6 +724,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -705,6 +732,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_9::api::apps::v1beta2::Scale), @@ -712,6 +740,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +800,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -801,6 +831,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -808,6 +839,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_9::api::apps::v1beta2::Scale), @@ -815,6 +847,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/apps/v1beta2/stateful_set.rs b/src/v1_9/api/apps/v1beta2/stateful_set.rs index 68d86d31a1..1cce0eb238 100644 --- a/src/v1_9/api/apps/v1beta2/stateful_set.rs +++ b/src/v1_9/api/apps/v1beta2/stateful_set.rs @@ -35,6 +35,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_stateful_set( namespace: &str, body: &crate::v1_9::api::apps::v1beta2::StatefulSet, @@ -63,6 +64,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -70,6 +72,7 @@ pub struct CreateNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::create_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1beta2::StatefulSet), @@ -78,6 +81,7 @@ pub enum CreateNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -143,6 +147,7 @@ impl StatefulSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_stateful_set( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -166,6 +171,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_collection_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedStatefulSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -173,6 +179,7 @@ pub enum DeleteCollectionNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -235,6 +242,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_stateful_set( name: &str, namespace: &str, @@ -256,6 +264,7 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::delete_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedStatefulSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -263,6 +272,7 @@ pub enum DeleteNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -323,6 +333,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_stateful_set( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -344,12 +355,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -393,6 +406,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_stateful_set_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -411,12 +425,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::list_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStatefulSetForAllNamespacesResponse { Ok(crate::v1_9::api::apps::v1beta2::StatefulSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -468,6 +484,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set( name: &str, namespace: &str, @@ -497,12 +514,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -554,6 +573,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -583,12 +603,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::patch_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -638,6 +660,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set( name: &str, namespace: &str, @@ -674,6 +697,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -685,12 +709,14 @@ pub struct ReadNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -740,6 +766,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -768,6 +795,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -775,12 +803,14 @@ pub struct ReadNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::read_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::StatefulSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -832,6 +862,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set( name: &str, namespace: &str, @@ -862,6 +893,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -869,6 +901,7 @@ pub struct ReplaceNamespacedStatefulSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetResponse { Ok(crate::v1_9::api::apps::v1beta2::StatefulSet), @@ -876,6 +909,7 @@ pub enum ReplaceNamespacedStatefulSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -935,6 +969,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_status( name: &str, namespace: &str, @@ -965,6 +1000,7 @@ impl StatefulSet { } /// Optional parameters of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -972,6 +1008,7 @@ pub struct ReplaceNamespacedStatefulSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::replace_namespaced_stateful_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetStatusResponse { Ok(crate::v1_9::api::apps::v1beta2::StatefulSet), @@ -979,6 +1016,7 @@ pub enum ReplaceNamespacedStatefulSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1034,6 +1072,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_stateful_set( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1055,12 +1094,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_namespaced_stateful_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedStatefulSetResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedStatefulSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1106,6 +1147,7 @@ impl StatefulSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_stateful_set_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1124,12 +1166,14 @@ impl StatefulSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`StatefulSet::watch_stateful_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStatefulSetForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStatefulSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/authentication/v1/mod.rs b/src/v1_9/api/authentication/v1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_9/api/authentication/v1/mod.rs +++ b/src/v1_9/api/authentication/v1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_9/api/authentication/v1/token_review.rs b/src/v1_9/api/authentication/v1/token_review.rs index 35e2c07100..ff16c8fc3c 100644 --- a/src/v1_9/api/authentication/v1/token_review.rs +++ b/src/v1_9/api/authentication/v1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_9::api::authentication::v1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -53,6 +54,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_9::api::authentication::v1::TokenReview), @@ -68,6 +71,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/authentication/v1beta1/mod.rs b/src/v1_9/api/authentication/v1beta1/mod.rs index 9c1c8c2957..e18299e05b 100644 --- a/src/v1_9/api/authentication/v1beta1/mod.rs +++ b/src/v1_9/api/authentication/v1beta1/mod.rs @@ -1,21 +1,13 @@ mod token_review; -pub use self::token_review::{ - TokenReview, - CreateTokenReviewOptional, CreateTokenReviewResponse, -}; +pub use self::token_review::TokenReview; +#[cfg(feature = "api")] pub use self::token_review::{CreateTokenReviewOptional, CreateTokenReviewResponse}; mod token_review_spec; -pub use self::token_review_spec::{ - TokenReviewSpec, -}; +pub use self::token_review_spec::TokenReviewSpec; mod token_review_status; -pub use self::token_review_status::{ - TokenReviewStatus, -}; +pub use self::token_review_status::TokenReviewStatus; mod user_info; -pub use self::user_info::{ - UserInfo, -}; +pub use self::user_info::UserInfo; diff --git a/src/v1_9/api/authentication/v1beta1/token_review.rs b/src/v1_9/api/authentication/v1beta1/token_review.rs index a72e82275c..465b12797e 100644 --- a/src/v1_9/api/authentication/v1beta1/token_review.rs +++ b/src/v1_9/api/authentication/v1beta1/token_review.rs @@ -28,6 +28,7 @@ impl TokenReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_token_review( body: &crate::v1_9::api::authentication::v1beta1::TokenReview, optional: CreateTokenReviewOptional<'_>, @@ -53,6 +54,7 @@ impl TokenReview { } /// Optional parameters of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateTokenReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateTokenReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`TokenReview::create_token_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateTokenReviewResponse { Ok(crate::v1_9::api::authentication::v1beta1::TokenReview), @@ -68,6 +71,7 @@ pub enum CreateTokenReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateTokenReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/authorization/v1/local_subject_access_review.rs b/src/v1_9/api/authorization/v1/local_subject_access_review.rs index 6e3b032a64..661d257261 100644 --- a/src/v1_9/api/authorization/v1/local_subject_access_review.rs +++ b/src/v1_9/api/authorization/v1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_9::api::authorization::v1::LocalSubjectAccessReview, @@ -60,6 +61,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,6 +69,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_9::api::authorization::v1::LocalSubjectAccessReview), @@ -75,6 +78,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/authorization/v1/mod.rs b/src/v1_9/api/authorization/v1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_9/api/authorization/v1/mod.rs +++ b/src/v1_9/api/authorization/v1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_9/api/authorization/v1/self_subject_access_review.rs b/src/v1_9/api/authorization/v1/self_subject_access_review.rs index 8a60dcf199..6995763aca 100644 --- a/src/v1_9/api/authorization/v1/self_subject_access_review.rs +++ b/src/v1_9/api/authorization/v1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_9::api::authorization::v1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_9::api::authorization::v1::SelfSubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/authorization/v1/self_subject_rules_review.rs b/src/v1_9/api/authorization/v1/self_subject_rules_review.rs index 845af6e519..361b0465d4 100644 --- a/src/v1_9/api/authorization/v1/self_subject_rules_review.rs +++ b/src/v1_9/api/authorization/v1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_9::api::authorization::v1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_9::api::authorization::v1::SelfSubjectRulesReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/authorization/v1/subject_access_review.rs b/src/v1_9/api/authorization/v1/subject_access_review.rs index d6e5526261..81be0b8e9a 100644 --- a/src/v1_9/api/authorization/v1/subject_access_review.rs +++ b/src/v1_9/api/authorization/v1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_9::api::authorization::v1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_9::api::authorization::v1::SubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/authorization/v1beta1/local_subject_access_review.rs b/src/v1_9/api/authorization/v1beta1/local_subject_access_review.rs index ff27d43a91..9d778bfe1b 100644 --- a/src/v1_9/api/authorization/v1beta1/local_subject_access_review.rs +++ b/src/v1_9/api/authorization/v1beta1/local_subject_access_review.rs @@ -32,6 +32,7 @@ impl LocalSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_local_subject_access_review( namespace: &str, body: &crate::v1_9::api::authorization::v1beta1::LocalSubjectAccessReview, @@ -60,6 +61,7 @@ impl LocalSubjectAccessReview { } /// Optional parameters of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,6 +69,7 @@ pub struct CreateNamespacedLocalSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LocalSubjectAccessReview::create_namespaced_local_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Ok(crate::v1_9::api::authorization::v1beta1::LocalSubjectAccessReview), @@ -75,6 +78,7 @@ pub enum CreateNamespacedLocalSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLocalSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/authorization/v1beta1/mod.rs b/src/v1_9/api/authorization/v1beta1/mod.rs index 39fb1b1cd4..6d5013de11 100644 --- a/src/v1_9/api/authorization/v1beta1/mod.rs +++ b/src/v1_9/api/authorization/v1beta1/mod.rs @@ -1,69 +1,43 @@ mod local_subject_access_review; -pub use self::local_subject_access_review::{ - LocalSubjectAccessReview, - CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse, -}; +pub use self::local_subject_access_review::LocalSubjectAccessReview; +#[cfg(feature = "api")] pub use self::local_subject_access_review::{CreateNamespacedLocalSubjectAccessReviewOptional, CreateNamespacedLocalSubjectAccessReviewResponse}; mod non_resource_attributes; -pub use self::non_resource_attributes::{ - NonResourceAttributes, -}; +pub use self::non_resource_attributes::NonResourceAttributes; mod non_resource_rule; -pub use self::non_resource_rule::{ - NonResourceRule, -}; +pub use self::non_resource_rule::NonResourceRule; mod resource_attributes; -pub use self::resource_attributes::{ - ResourceAttributes, -}; +pub use self::resource_attributes::ResourceAttributes; mod resource_rule; -pub use self::resource_rule::{ - ResourceRule, -}; +pub use self::resource_rule::ResourceRule; mod self_subject_access_review; -pub use self::self_subject_access_review::{ - SelfSubjectAccessReview, - CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse, -}; +pub use self::self_subject_access_review::SelfSubjectAccessReview; +#[cfg(feature = "api")] pub use self::self_subject_access_review::{CreateSelfSubjectAccessReviewOptional, CreateSelfSubjectAccessReviewResponse}; mod self_subject_access_review_spec; -pub use self::self_subject_access_review_spec::{ - SelfSubjectAccessReviewSpec, -}; +pub use self::self_subject_access_review_spec::SelfSubjectAccessReviewSpec; mod self_subject_rules_review; -pub use self::self_subject_rules_review::{ - SelfSubjectRulesReview, - CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse, -}; +pub use self::self_subject_rules_review::SelfSubjectRulesReview; +#[cfg(feature = "api")] pub use self::self_subject_rules_review::{CreateSelfSubjectRulesReviewOptional, CreateSelfSubjectRulesReviewResponse}; mod self_subject_rules_review_spec; -pub use self::self_subject_rules_review_spec::{ - SelfSubjectRulesReviewSpec, -}; +pub use self::self_subject_rules_review_spec::SelfSubjectRulesReviewSpec; mod subject_access_review; -pub use self::subject_access_review::{ - SubjectAccessReview, - CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse, -}; +pub use self::subject_access_review::SubjectAccessReview; +#[cfg(feature = "api")] pub use self::subject_access_review::{CreateSubjectAccessReviewOptional, CreateSubjectAccessReviewResponse}; mod subject_access_review_spec; -pub use self::subject_access_review_spec::{ - SubjectAccessReviewSpec, -}; +pub use self::subject_access_review_spec::SubjectAccessReviewSpec; mod subject_access_review_status; -pub use self::subject_access_review_status::{ - SubjectAccessReviewStatus, -}; +pub use self::subject_access_review_status::SubjectAccessReviewStatus; mod subject_rules_review_status; -pub use self::subject_rules_review_status::{ - SubjectRulesReviewStatus, -}; +pub use self::subject_rules_review_status::SubjectRulesReviewStatus; diff --git a/src/v1_9/api/authorization/v1beta1/self_subject_access_review.rs b/src/v1_9/api/authorization/v1beta1/self_subject_access_review.rs index e96fcff391..68515d073c 100644 --- a/src/v1_9/api/authorization/v1beta1/self_subject_access_review.rs +++ b/src/v1_9/api/authorization/v1beta1/self_subject_access_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_access_review( body: &crate::v1_9::api::authorization::v1beta1::SelfSubjectAccessReview, optional: CreateSelfSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectAccessReview { } /// Optional parameters of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectAccessReview::create_self_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectAccessReviewResponse { Ok(crate::v1_9::api::authorization::v1beta1::SelfSubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/authorization/v1beta1/self_subject_rules_review.rs b/src/v1_9/api/authorization/v1beta1/self_subject_rules_review.rs index 5193ca9e8c..df932f6381 100644 --- a/src/v1_9/api/authorization/v1beta1/self_subject_rules_review.rs +++ b/src/v1_9/api/authorization/v1beta1/self_subject_rules_review.rs @@ -28,6 +28,7 @@ impl SelfSubjectRulesReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_self_subject_rules_review( body: &crate::v1_9::api::authorization::v1beta1::SelfSubjectRulesReview, optional: CreateSelfSubjectRulesReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SelfSubjectRulesReview { } /// Optional parameters of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSelfSubjectRulesReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSelfSubjectRulesReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SelfSubjectRulesReview::create_self_subject_rules_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSelfSubjectRulesReviewResponse { Ok(crate::v1_9::api::authorization::v1beta1::SelfSubjectRulesReview), @@ -68,6 +71,7 @@ pub enum CreateSelfSubjectRulesReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSelfSubjectRulesReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/authorization/v1beta1/subject_access_review.rs b/src/v1_9/api/authorization/v1beta1/subject_access_review.rs index a2d196d389..3d4de34f2b 100644 --- a/src/v1_9/api/authorization/v1beta1/subject_access_review.rs +++ b/src/v1_9/api/authorization/v1beta1/subject_access_review.rs @@ -28,6 +28,7 @@ impl SubjectAccessReview { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_subject_access_review( body: &crate::v1_9::api::authorization::v1beta1::SubjectAccessReview, optional: CreateSubjectAccessReviewOptional<'_>, @@ -53,6 +54,7 @@ impl SubjectAccessReview { } /// Optional parameters of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateSubjectAccessReviewOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateSubjectAccessReviewOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`SubjectAccessReview::create_subject_access_review`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateSubjectAccessReviewResponse { Ok(crate::v1_9::api::authorization::v1beta1::SubjectAccessReview), @@ -68,6 +71,7 @@ pub enum CreateSubjectAccessReviewResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateSubjectAccessReviewResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/autoscaling/v1/horizontal_pod_autoscaler.rs b/src/v1_9/api/autoscaling/v1/horizontal_pod_autoscaler.rs index b94efb0f79..807f662b66 100644 --- a/src/v1_9/api/autoscaling/v1/horizontal_pod_autoscaler.rs +++ b/src/v1_9/api/autoscaling/v1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_9::api::autoscaling::v1::HorizontalPodAutoscaler, @@ -61,6 +62,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -76,6 +79,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_9::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::api::autoscaling::v1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_9::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_9::api::autoscaling::v1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_9::api::autoscaling::v1::HorizontalPodAutoscaler), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/autoscaling/v1/mod.rs b/src/v1_9/api/autoscaling/v1/mod.rs index a4f7a0312d..09ed1f1487 100644 --- a/src/v1_9/api/autoscaling/v1/mod.rs +++ b/src/v1_9/api/autoscaling/v1/mod.rs @@ -1,65 +1,49 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedStatefulSetScaleResponse, - PatchNamespacedReplicationControllerScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse, - ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse, - ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedStatefulSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedStatefulSetScaleOptional, ReadNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerScaleOptional, ReadNamespacedReplicationControllerScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedStatefulSetScaleOptional, ReplaceNamespacedStatefulSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerScaleOptional, ReplaceNamespacedReplicationControllerScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; diff --git a/src/v1_9/api/autoscaling/v1/scale.rs b/src/v1_9/api/autoscaling/v1/scale.rs index ef0f96a03c..6f9cf9f4ce 100644 --- a/src/v1_9/api/autoscaling/v1/scale.rs +++ b/src/v1_9/api/autoscaling/v1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedStatefulSetScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -295,6 +304,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -324,12 +334,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -379,6 +391,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -407,6 +420,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -414,12 +428,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -497,6 +514,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -504,12 +522,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -559,6 +579,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -587,6 +608,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -594,12 +616,14 @@ pub struct ReadNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedStatefulSetScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -649,6 +673,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -677,6 +702,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -684,12 +710,14 @@ pub struct ReadNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +769,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -771,6 +800,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -778,6 +808,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), @@ -785,6 +816,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -844,6 +876,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -874,6 +907,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -881,6 +915,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), @@ -888,6 +923,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -947,6 +983,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_stateful_set_scale( name: &str, namespace: &str, @@ -977,6 +1014,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -984,6 +1022,7 @@ pub struct ReplaceNamespacedStatefulSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_stateful_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedStatefulSetScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), @@ -991,6 +1030,7 @@ pub enum ReplaceNamespacedStatefulSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedStatefulSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1050,6 +1090,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_scale( name: &str, namespace: &str, @@ -1080,6 +1121,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1087,6 +1129,7 @@ pub struct ReplaceNamespacedReplicationControllerScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerScaleResponse { Ok(crate::v1_9::api::autoscaling::v1::Scale), @@ -1094,6 +1137,7 @@ pub enum ReplaceNamespacedReplicationControllerScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs b/src/v1_9/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs index 36ec881eea..cf8d36163d 100644 --- a/src/v1_9/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs +++ b/src/v1_9/api/autoscaling/v2beta1/horizontal_pod_autoscaler.rs @@ -33,6 +33,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_horizontal_pod_autoscaler( namespace: &str, body: &crate::v1_9::api::autoscaling::v2beta1::HorizontalPodAutoscaler, @@ -61,6 +62,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::create_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -76,6 +79,7 @@ pub enum CreateNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl HorizontalPodAutoscaler { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_horizontal_pod_autoscaler( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_collection_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::delete_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_9::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::list_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::api::autoscaling::v2beta1::HorizontalPodAutoscalerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::patch_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_9::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::read_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_9::api::autoscaling::v2beta1::HorizontalPodAutoscaler), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_horizontal_pod_autoscaler_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl HorizontalPodAutoscaler { } /// Optional parameters of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedHorizontalPodAutoscalerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::replace_namespaced_horizontal_pod_autoscaler_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Ok(crate::v1_9::api::autoscaling::v2beta1::HorizontalPodAutoscaler), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedHorizontalPodAutoscalerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_horizontal_pod_autoscaler_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_horizontal_pod_autoscaler_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchHorizontalPodAutoscalerForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchHorizontalPodAutoscalerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl HorizontalPodAutoscaler { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_horizontal_pod_autoscaler( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl HorizontalPodAutoscaler { } /// Use `::try_from_parts` to parse the HTTP response body of [`HorizontalPodAutoscaler::watch_namespaced_horizontal_pod_autoscaler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedHorizontalPodAutoscalerResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedHorizontalPodAutoscalerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/autoscaling/v2beta1/mod.rs b/src/v1_9/api/autoscaling/v2beta1/mod.rs index 140b43f6c6..7bfd9d8f5b 100644 --- a/src/v1_9/api/autoscaling/v2beta1/mod.rs +++ b/src/v1_9/api/autoscaling/v2beta1/mod.rs @@ -1,83 +1,55 @@ mod cross_version_object_reference; -pub use self::cross_version_object_reference::{ - CrossVersionObjectReference, -}; +pub use self::cross_version_object_reference::CrossVersionObjectReference; mod horizontal_pod_autoscaler; -pub use self::horizontal_pod_autoscaler::{ - HorizontalPodAutoscaler, - CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse, - DeleteCollectionNamespacedHorizontalPodAutoscalerResponse, - DeleteNamespacedHorizontalPodAutoscalerResponse, - ListHorizontalPodAutoscalerForAllNamespacesResponse, - ListNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerResponse, - PatchNamespacedHorizontalPodAutoscalerStatusResponse, - ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse, - ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse, - ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse, - ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse, - WatchHorizontalPodAutoscalerForAllNamespacesResponse, - WatchNamespacedHorizontalPodAutoscalerResponse, -}; +pub use self::horizontal_pod_autoscaler::HorizontalPodAutoscaler; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{CreateNamespacedHorizontalPodAutoscalerOptional, CreateNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteCollectionNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::DeleteNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::ListNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::PatchNamespacedHorizontalPodAutoscalerStatusResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerOptional, ReadNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReadNamespacedHorizontalPodAutoscalerStatusOptional, ReadNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerOptional, ReplaceNamespacedHorizontalPodAutoscalerResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::{ReplaceNamespacedHorizontalPodAutoscalerStatusOptional, ReplaceNamespacedHorizontalPodAutoscalerStatusResponse}; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchHorizontalPodAutoscalerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::horizontal_pod_autoscaler::WatchNamespacedHorizontalPodAutoscalerResponse; mod horizontal_pod_autoscaler_condition; -pub use self::horizontal_pod_autoscaler_condition::{ - HorizontalPodAutoscalerCondition, -}; +pub use self::horizontal_pod_autoscaler_condition::HorizontalPodAutoscalerCondition; mod horizontal_pod_autoscaler_list; -pub use self::horizontal_pod_autoscaler_list::{ - HorizontalPodAutoscalerList, -}; +pub use self::horizontal_pod_autoscaler_list::HorizontalPodAutoscalerList; mod horizontal_pod_autoscaler_spec; -pub use self::horizontal_pod_autoscaler_spec::{ - HorizontalPodAutoscalerSpec, -}; +pub use self::horizontal_pod_autoscaler_spec::HorizontalPodAutoscalerSpec; mod horizontal_pod_autoscaler_status; -pub use self::horizontal_pod_autoscaler_status::{ - HorizontalPodAutoscalerStatus, -}; +pub use self::horizontal_pod_autoscaler_status::HorizontalPodAutoscalerStatus; mod metric_spec; -pub use self::metric_spec::{ - MetricSpec, -}; +pub use self::metric_spec::MetricSpec; mod metric_status; -pub use self::metric_status::{ - MetricStatus, -}; +pub use self::metric_status::MetricStatus; mod object_metric_source; -pub use self::object_metric_source::{ - ObjectMetricSource, -}; +pub use self::object_metric_source::ObjectMetricSource; mod object_metric_status; -pub use self::object_metric_status::{ - ObjectMetricStatus, -}; +pub use self::object_metric_status::ObjectMetricStatus; mod pods_metric_source; -pub use self::pods_metric_source::{ - PodsMetricSource, -}; +pub use self::pods_metric_source::PodsMetricSource; mod pods_metric_status; -pub use self::pods_metric_status::{ - PodsMetricStatus, -}; +pub use self::pods_metric_status::PodsMetricStatus; mod resource_metric_source; -pub use self::resource_metric_source::{ - ResourceMetricSource, -}; +pub use self::resource_metric_source::ResourceMetricSource; mod resource_metric_status; -pub use self::resource_metric_status::{ - ResourceMetricStatus, -}; +pub use self::resource_metric_status::ResourceMetricStatus; diff --git a/src/v1_9/api/batch/v1/job.rs b/src/v1_9/api/batch/v1/job.rs index 7c23748be3..3ced52daca 100644 --- a/src/v1_9/api/batch/v1/job.rs +++ b/src/v1_9/api/batch/v1/job.rs @@ -33,6 +33,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_job( namespace: &str, body: &crate::v1_9::api::batch::v1::Job, @@ -61,6 +62,7 @@ impl Job { } /// Optional parameters of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::create_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedJobResponse { Ok(crate::v1_9::api::batch::v1::Job), @@ -76,6 +79,7 @@ pub enum CreateNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Job { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_job( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_collection_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedJobResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_job( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::delete_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedJobResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_job_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListJobForAllNamespacesResponse { Ok(crate::v1_9::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_job( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::list_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedJobResponse { Ok(crate::v1_9::api::batch::v1::JobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobResponse { Ok(crate::v1_9::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_job_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::patch_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedJobStatusResponse { Ok(crate::v1_9::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobResponse { Ok(crate::v1_9::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_job_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Job { } /// Optional parameters of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::read_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedJobStatusResponse { Ok(crate::v1_9::api::batch::v1::Job), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobResponse { Ok(crate::v1_9::api::batch::v1::Job), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_job_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Job { } /// Optional parameters of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::replace_namespaced_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedJobStatusResponse { Ok(crate::v1_9::api::batch::v1::Job), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_job_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchJobForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Job { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_job( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Job { } /// Use `::try_from_parts` to parse the HTTP response body of [`Job::watch_namespaced_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedJobResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/batch/v1/mod.rs b/src/v1_9/api/batch/v1/mod.rs index 68e7a18867..97d7bccb74 100644 --- a/src/v1_9/api/batch/v1/mod.rs +++ b/src/v1_9/api/batch/v1/mod.rs @@ -1,38 +1,28 @@ mod job; -pub use self::job::{ - Job, - CreateNamespacedJobOptional, CreateNamespacedJobResponse, - DeleteCollectionNamespacedJobResponse, - DeleteNamespacedJobResponse, - ListJobForAllNamespacesResponse, - ListNamespacedJobResponse, - PatchNamespacedJobResponse, - PatchNamespacedJobStatusResponse, - ReadNamespacedJobOptional, ReadNamespacedJobResponse, - ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse, - ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse, - ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse, - WatchJobForAllNamespacesResponse, - WatchNamespacedJobResponse, -}; +pub use self::job::Job; +#[cfg(feature = "api")] pub use self::job::{CreateNamespacedJobOptional, CreateNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::DeleteCollectionNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::DeleteNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::ListJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::ListNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobResponse; +#[cfg(feature = "api")] pub use self::job::PatchNamespacedJobStatusResponse; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobOptional, ReadNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReadNamespacedJobStatusOptional, ReadNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobOptional, ReplaceNamespacedJobResponse}; +#[cfg(feature = "api")] pub use self::job::{ReplaceNamespacedJobStatusOptional, ReplaceNamespacedJobStatusResponse}; +#[cfg(feature = "api")] pub use self::job::WatchJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::job::WatchNamespacedJobResponse; mod job_condition; -pub use self::job_condition::{ - JobCondition, -}; +pub use self::job_condition::JobCondition; mod job_list; -pub use self::job_list::{ - JobList, -}; +pub use self::job_list::JobList; mod job_spec; -pub use self::job_spec::{ - JobSpec, -}; +pub use self::job_spec::JobSpec; mod job_status; -pub use self::job_status::{ - JobStatus, -}; +pub use self::job_status::JobStatus; diff --git a/src/v1_9/api/batch/v1beta1/cron_job.rs b/src/v1_9/api/batch/v1beta1/cron_job.rs index a5de9df8c8..db321c1d5d 100644 --- a/src/v1_9/api/batch/v1beta1/cron_job.rs +++ b/src/v1_9/api/batch/v1beta1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_9::api::batch::v1beta1::CronJob, @@ -61,6 +62,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_9::api::batch::v1beta1::CronJob), @@ -76,6 +79,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_9::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_9::api::batch::v1beta1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_9::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_9::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_9::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_9::api::batch::v1beta1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_9::api::batch::v1beta1::CronJob), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_9::api::batch::v1beta1::CronJob), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/batch/v1beta1/mod.rs b/src/v1_9/api/batch/v1beta1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_9/api/batch/v1beta1/mod.rs +++ b/src/v1_9/api/batch/v1beta1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_9/api/batch/v2alpha1/cron_job.rs b/src/v1_9/api/batch/v2alpha1/cron_job.rs index 8016c0672e..3cac69a0a6 100644 --- a/src/v1_9/api/batch/v2alpha1/cron_job.rs +++ b/src/v1_9/api/batch/v2alpha1/cron_job.rs @@ -33,6 +33,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_cron_job( namespace: &str, body: &crate::v1_9::api::batch::v2alpha1::CronJob, @@ -61,6 +62,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::create_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedCronJobResponse { Ok(crate::v1_9::api::batch::v2alpha1::CronJob), @@ -76,6 +79,7 @@ pub enum CreateNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl CronJob { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_cron_job( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_collection_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedCronJobResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_cron_job( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::delete_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedCronJobResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cron_job_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCronJobForAllNamespacesResponse { Ok(crate::v1_9::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_cron_job( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::list_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedCronJobResponse { Ok(crate::v1_9::api::batch::v2alpha1::CronJobList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobResponse { Ok(crate::v1_9::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_cron_job_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::patch_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedCronJobStatusResponse { Ok(crate::v1_9::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobResponse { Ok(crate::v1_9::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_cron_job_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::read_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedCronJobStatusResponse { Ok(crate::v1_9::api::batch::v2alpha1::CronJob), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedCronJobOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobResponse { Ok(crate::v1_9::api::batch::v2alpha1::CronJob), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedCronJobResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_cron_job_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl CronJob { } /// Optional parameters of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedCronJobStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedCronJobStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::replace_namespaced_cron_job_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedCronJobStatusResponse { Ok(crate::v1_9::api::batch::v2alpha1::CronJob), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedCronJobStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedCronJobStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cron_job_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_cron_job_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCronJobForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCronJobForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl CronJob { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_cron_job( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl CronJob { } /// Use `::try_from_parts` to parse the HTTP response body of [`CronJob::watch_namespaced_cron_job`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedCronJobResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedCronJobResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/batch/v2alpha1/mod.rs b/src/v1_9/api/batch/v2alpha1/mod.rs index 707cc38913..e2ede311e4 100644 --- a/src/v1_9/api/batch/v2alpha1/mod.rs +++ b/src/v1_9/api/batch/v2alpha1/mod.rs @@ -1,38 +1,28 @@ mod cron_job; -pub use self::cron_job::{ - CronJob, - CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse, - DeleteCollectionNamespacedCronJobResponse, - DeleteNamespacedCronJobResponse, - ListCronJobForAllNamespacesResponse, - ListNamespacedCronJobResponse, - PatchNamespacedCronJobResponse, - PatchNamespacedCronJobStatusResponse, - ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse, - ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse, - ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse, - ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse, - WatchCronJobForAllNamespacesResponse, - WatchNamespacedCronJobResponse, -}; +pub use self::cron_job::CronJob; +#[cfg(feature = "api")] pub use self::cron_job::{CreateNamespacedCronJobOptional, CreateNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::DeleteCollectionNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::DeleteNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::ListNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobResponse; +#[cfg(feature = "api")] pub use self::cron_job::PatchNamespacedCronJobStatusResponse; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobOptional, ReadNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReadNamespacedCronJobStatusOptional, ReadNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobOptional, ReplaceNamespacedCronJobResponse}; +#[cfg(feature = "api")] pub use self::cron_job::{ReplaceNamespacedCronJobStatusOptional, ReplaceNamespacedCronJobStatusResponse}; +#[cfg(feature = "api")] pub use self::cron_job::WatchCronJobForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::cron_job::WatchNamespacedCronJobResponse; mod cron_job_list; -pub use self::cron_job_list::{ - CronJobList, -}; +pub use self::cron_job_list::CronJobList; mod cron_job_spec; -pub use self::cron_job_spec::{ - CronJobSpec, -}; +pub use self::cron_job_spec::CronJobSpec; mod cron_job_status; -pub use self::cron_job_status::{ - CronJobStatus, -}; +pub use self::cron_job_status::CronJobStatus; mod job_template_spec; -pub use self::job_template_spec::{ - JobTemplateSpec, -}; +pub use self::job_template_spec::JobTemplateSpec; diff --git a/src/v1_9/api/certificates/v1beta1/certificate_signing_request.rs b/src/v1_9/api/certificates/v1beta1/certificate_signing_request.rs index 33fb47d82e..386d624049 100644 --- a/src/v1_9/api/certificates/v1beta1/certificate_signing_request.rs +++ b/src/v1_9/api/certificates/v1beta1/certificate_signing_request.rs @@ -28,6 +28,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_certificate_signing_request( body: &crate::v1_9::api::certificates::v1beta1::CertificateSigningRequest, optional: CreateCertificateSigningRequestOptional<'_>, @@ -53,6 +54,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCertificateSigningRequestOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::create_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCertificateSigningRequestResponse { Ok(crate::v1_9::api::certificates::v1beta1::CertificateSigningRequest), @@ -68,6 +71,7 @@ pub enum CreateCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -129,6 +133,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_certificate_signing_request( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -148,6 +153,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCertificateSigningRequestResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -155,6 +161,7 @@ pub enum DeleteCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -213,6 +220,7 @@ impl CertificateSigningRequest { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_certificate_signing_request( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -233,6 +241,7 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::delete_collection_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCertificateSigningRequestResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteCollectionCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_certificate_signing_request( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::list_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCertificateSigningRequestResponse { Ok(crate::v1_9::api::certificates::v1beta1::CertificateSigningRequestList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_certificate_signing_request( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -394,12 +408,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::patch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCertificateSigningRequestResponse { Ok(crate::v1_9::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_certificate_signing_request( name: &str, optional: ReadCertificateSigningRequestOptional<'_>, @@ -479,6 +496,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCertificateSigningRequestOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -490,12 +508,14 @@ pub struct ReadCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::read_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCertificateSigningRequestResponse { Ok(crate::v1_9::api::certificates::v1beta1::CertificateSigningRequest), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -543,6 +563,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request( name: &str, body: &crate::v1_9::api::certificates::v1beta1::CertificateSigningRequest, @@ -571,6 +592,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestOptional<'a> { /// If 'true', then the output is pretty printed. @@ -578,6 +600,7 @@ pub struct ReplaceCertificateSigningRequestOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestResponse { Ok(crate::v1_9::api::certificates::v1beta1::CertificateSigningRequest), @@ -585,6 +608,7 @@ pub enum ReplaceCertificateSigningRequestResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -640,6 +664,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_approval( name: &str, body: &crate::v1_9::api::certificates::v1beta1::CertificateSigningRequest, @@ -668,6 +693,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,6 +701,7 @@ pub struct ReplaceCertificateSigningRequestApprovalOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_approval`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestApprovalResponse { Ok(crate::v1_9::api::certificates::v1beta1::CertificateSigningRequest), @@ -682,6 +709,7 @@ pub enum ReplaceCertificateSigningRequestApprovalResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestApprovalResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -737,6 +765,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_certificate_signing_request_status( name: &str, body: &crate::v1_9::api::certificates::v1beta1::CertificateSigningRequest, @@ -765,6 +794,7 @@ impl CertificateSigningRequest { } /// Optional parameters of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -772,6 +802,7 @@ pub struct ReplaceCertificateSigningRequestStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::replace_certificate_signing_request_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCertificateSigningRequestStatusResponse { Ok(crate::v1_9::api::certificates::v1beta1::CertificateSigningRequest), @@ -779,6 +810,7 @@ pub enum ReplaceCertificateSigningRequestStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCertificateSigningRequestStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +862,7 @@ impl CertificateSigningRequest { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_certificate_signing_request( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -848,12 +881,14 @@ impl CertificateSigningRequest { } /// Use `::try_from_parts` to parse the HTTP response body of [`CertificateSigningRequest::watch_certificate_signing_request`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCertificateSigningRequestResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCertificateSigningRequestResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/certificates/v1beta1/mod.rs b/src/v1_9/api/certificates/v1beta1/mod.rs index 7550699fa0..1e75e0820e 100644 --- a/src/v1_9/api/certificates/v1beta1/mod.rs +++ b/src/v1_9/api/certificates/v1beta1/mod.rs @@ -1,35 +1,25 @@ mod certificate_signing_request; -pub use self::certificate_signing_request::{ - CertificateSigningRequest, - CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse, - DeleteCertificateSigningRequestResponse, - DeleteCollectionCertificateSigningRequestResponse, - ListCertificateSigningRequestResponse, - PatchCertificateSigningRequestResponse, - ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse, - ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse, - ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse, - ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse, - WatchCertificateSigningRequestResponse, -}; +pub use self::certificate_signing_request::CertificateSigningRequest; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{CreateCertificateSigningRequestOptional, CreateCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::DeleteCollectionCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::ListCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::PatchCertificateSigningRequestResponse; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReadCertificateSigningRequestOptional, ReadCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestOptional, ReplaceCertificateSigningRequestResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestApprovalOptional, ReplaceCertificateSigningRequestApprovalResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::{ReplaceCertificateSigningRequestStatusOptional, ReplaceCertificateSigningRequestStatusResponse}; +#[cfg(feature = "api")] pub use self::certificate_signing_request::WatchCertificateSigningRequestResponse; mod certificate_signing_request_condition; -pub use self::certificate_signing_request_condition::{ - CertificateSigningRequestCondition, -}; +pub use self::certificate_signing_request_condition::CertificateSigningRequestCondition; mod certificate_signing_request_list; -pub use self::certificate_signing_request_list::{ - CertificateSigningRequestList, -}; +pub use self::certificate_signing_request_list::CertificateSigningRequestList; mod certificate_signing_request_spec; -pub use self::certificate_signing_request_spec::{ - CertificateSigningRequestSpec, -}; +pub use self::certificate_signing_request_spec::CertificateSigningRequestSpec; mod certificate_signing_request_status; -pub use self::certificate_signing_request_status::{ - CertificateSigningRequestStatus, -}; +pub use self::certificate_signing_request_status::CertificateSigningRequestStatus; diff --git a/src/v1_9/api/core/v1/binding.rs b/src/v1_9/api/core/v1/binding.rs index 488b598db3..a0ddf9b64a 100644 --- a/src/v1_9/api/core/v1/binding.rs +++ b/src/v1_9/api/core/v1/binding.rs @@ -30,6 +30,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_binding( namespace: &str, body: &crate::v1_9::api::core::v1::Binding, @@ -58,6 +59,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedBindingResponse { Ok(crate::v1_9::api::core::v1::Binding), @@ -73,6 +76,7 @@ pub enum CreateNamespacedBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -140,6 +144,7 @@ impl Binding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_binding( name: &str, namespace: &str, @@ -170,6 +175,7 @@ impl Binding { } /// Optional parameters of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -177,6 +183,7 @@ pub struct CreateNamespacedPodBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Binding::create_namespaced_pod_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodBindingResponse { Ok(crate::v1_9::api::core::v1::Binding), @@ -185,6 +192,7 @@ pub enum CreateNamespacedPodBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/component_status.rs b/src/v1_9/api/core/v1/component_status.rs index 330622935c..ee083aac79 100644 --- a/src/v1_9/api/core/v1/component_status.rs +++ b/src/v1_9/api/core/v1/component_status.rs @@ -26,6 +26,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_component_status( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -44,12 +45,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::list_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListComponentStatusResponse { Ok(crate::v1_9::api::core::v1::ComponentStatusList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -95,6 +98,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_component_status( name: &str, optional: ReadComponentStatusOptional<'_>, @@ -121,6 +125,7 @@ impl ComponentStatus { } /// Optional parameters of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadComponentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -128,12 +133,14 @@ pub struct ReadComponentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::read_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadComponentStatusResponse { Ok(crate::v1_9::api::core::v1::ComponentStatus), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -177,6 +184,7 @@ impl ComponentStatus { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_component_status( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -195,12 +203,14 @@ impl ComponentStatus { } /// Use `::try_from_parts` to parse the HTTP response body of [`ComponentStatus::watch_component_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchComponentStatusResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchComponentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/config_map.rs b/src/v1_9/api/core/v1/config_map.rs index 251a9199a5..8872726112 100644 --- a/src/v1_9/api/core/v1/config_map.rs +++ b/src/v1_9/api/core/v1/config_map.rs @@ -30,6 +30,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_config_map( namespace: &str, body: &crate::v1_9::api::core::v1::ConfigMap, @@ -58,6 +59,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedConfigMapOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::create_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedConfigMapResponse { Ok(crate::v1_9::api::core::v1::ConfigMap), @@ -73,6 +76,7 @@ pub enum CreateNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl ConfigMap { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_config_map( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_collection_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedConfigMapResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_config_map( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::delete_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedConfigMapResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -314,6 +324,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_config_map_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -332,12 +343,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListConfigMapForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -385,6 +398,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_config_map( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -406,12 +420,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::list_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedConfigMapResponse { Ok(crate::v1_9::api::core::v1::ConfigMapList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_config_map( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::patch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedConfigMapResponse { Ok(crate::v1_9::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_config_map( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedConfigMapOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::read_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedConfigMapResponse { Ok(crate::v1_9::api::core::v1::ConfigMap), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_config_map( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl ConfigMap { } /// Optional parameters of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedConfigMapOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedConfigMapOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::replace_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedConfigMapResponse { Ok(crate::v1_9::api::core::v1::ConfigMap), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedConfigMapResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -746,6 +773,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_config_map_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -764,12 +792,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_config_map_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchConfigMapForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchConfigMapForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -819,6 +849,7 @@ impl ConfigMap { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_config_map( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -840,12 +871,14 @@ impl ConfigMap { } /// Use `::try_from_parts` to parse the HTTP response body of [`ConfigMap::watch_namespaced_config_map`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedConfigMapResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedConfigMapResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/endpoints.rs b/src/v1_9/api/core/v1/endpoints.rs index cfe555337e..56a766837d 100644 --- a/src/v1_9/api/core/v1/endpoints.rs +++ b/src/v1_9/api/core/v1/endpoints.rs @@ -41,6 +41,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_endpoints( namespace: &str, body: &crate::v1_9::api::core::v1::Endpoints, @@ -69,6 +70,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEndpointsOptional<'a> { /// If 'true', then the output is pretty printed. @@ -76,6 +78,7 @@ pub struct CreateNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::create_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEndpointsResponse { Ok(crate::v1_9::api::core::v1::Endpoints), @@ -84,6 +87,7 @@ pub enum CreateNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -149,6 +153,7 @@ impl Endpoints { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_endpoints( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -172,6 +177,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_collection_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEndpointsResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -179,6 +185,7 @@ pub enum DeleteCollectionNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -241,6 +248,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_endpoints( name: &str, namespace: &str, @@ -262,6 +270,7 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::delete_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEndpointsResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -269,6 +278,7 @@ pub enum DeleteNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -325,6 +335,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_endpoints_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -343,12 +354,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEndpointsForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -396,6 +409,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_endpoints( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -417,12 +431,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::list_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEndpointsResponse { Ok(crate::v1_9::api::core::v1::EndpointsList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -474,6 +490,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_endpoints( name: &str, namespace: &str, @@ -503,12 +520,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::patch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEndpointsResponse { Ok(crate::v1_9::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -558,6 +577,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_endpoints( name: &str, namespace: &str, @@ -594,6 +614,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEndpointsOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -605,12 +626,14 @@ pub struct ReadNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::read_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEndpointsResponse { Ok(crate::v1_9::api::core::v1::Endpoints), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -662,6 +685,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_endpoints( name: &str, namespace: &str, @@ -692,6 +716,7 @@ impl Endpoints { } /// Optional parameters of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEndpointsOptional<'a> { /// If 'true', then the output is pretty printed. @@ -699,6 +724,7 @@ pub struct ReplaceNamespacedEndpointsOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::replace_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEndpointsResponse { Ok(crate::v1_9::api::core::v1::Endpoints), @@ -706,6 +732,7 @@ pub enum ReplaceNamespacedEndpointsResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -757,6 +784,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_endpoints_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -775,12 +803,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_endpoints_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEndpointsForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEndpointsForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Endpoints { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_endpoints( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -851,12 +882,14 @@ impl Endpoints { } /// Use `::try_from_parts` to parse the HTTP response body of [`Endpoints::watch_namespaced_endpoints`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEndpointsResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEndpointsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/event.rs b/src/v1_9/api/core/v1/event.rs index 2fe823a47d..c4c35345a6 100644 --- a/src/v1_9/api/core/v1/event.rs +++ b/src/v1_9/api/core/v1/event.rs @@ -69,6 +69,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_9::api::core::v1::Event, @@ -97,6 +98,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -104,6 +106,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_9::api::core::v1::Event), @@ -112,6 +115,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -177,6 +181,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -200,6 +205,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -207,6 +213,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -269,6 +276,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -290,6 +298,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -297,6 +306,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -353,6 +363,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -371,12 +382,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -424,6 +437,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -445,12 +459,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_9::api::core::v1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -502,6 +518,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -531,12 +548,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_9::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -586,6 +605,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -622,6 +642,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -633,12 +654,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_9::api::core::v1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -690,6 +713,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -720,6 +744,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -727,6 +752,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_9::api::core::v1::Event), @@ -734,6 +760,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -785,6 +812,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -803,12 +831,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -858,6 +888,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -879,12 +910,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/limit_range.rs b/src/v1_9/api/core/v1/limit_range.rs index 10b0dc4884..749e8a97fd 100644 --- a/src/v1_9/api/core/v1/limit_range.rs +++ b/src/v1_9/api/core/v1/limit_range.rs @@ -30,6 +30,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_limit_range( namespace: &str, body: &crate::v1_9::api::core::v1::LimitRange, @@ -58,6 +59,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedLimitRangeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::create_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedLimitRangeResponse { Ok(crate::v1_9::api::core::v1::LimitRange), @@ -73,6 +76,7 @@ pub enum CreateNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl LimitRange { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_limit_range( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_collection_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedLimitRangeResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_limit_range( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::delete_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedLimitRangeResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -314,6 +324,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_limit_range_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -332,12 +343,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListLimitRangeForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -385,6 +398,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_limit_range( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -406,12 +420,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::list_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedLimitRangeResponse { Ok(crate::v1_9::api::core::v1::LimitRangeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_limit_range( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::patch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedLimitRangeResponse { Ok(crate::v1_9::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_limit_range( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedLimitRangeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::read_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedLimitRangeResponse { Ok(crate::v1_9::api::core::v1::LimitRange), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_limit_range( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl LimitRange { } /// Optional parameters of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedLimitRangeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedLimitRangeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::replace_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedLimitRangeResponse { Ok(crate::v1_9::api::core::v1::LimitRange), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedLimitRangeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -746,6 +773,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_limit_range_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -764,12 +792,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_limit_range_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchLimitRangeForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchLimitRangeForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -819,6 +849,7 @@ impl LimitRange { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_limit_range( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -840,12 +871,14 @@ impl LimitRange { } /// Use `::try_from_parts` to parse the HTTP response body of [`LimitRange::watch_namespaced_limit_range`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedLimitRangeResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedLimitRangeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/mod.rs b/src/v1_9/api/core/v1/mod.rs index 06d6e2f521..1f2c34d3bd 100644 --- a/src/v1_9/api/core/v1/mod.rs +++ b/src/v1_9/api/core/v1/mod.rs @@ -1,1059 +1,731 @@ mod aws_elastic_block_store_volume_source; -pub use self::aws_elastic_block_store_volume_source::{ - AWSElasticBlockStoreVolumeSource, -}; +pub use self::aws_elastic_block_store_volume_source::AWSElasticBlockStoreVolumeSource; mod affinity; -pub use self::affinity::{ - Affinity, -}; +pub use self::affinity::Affinity; mod attached_volume; -pub use self::attached_volume::{ - AttachedVolume, -}; +pub use self::attached_volume::AttachedVolume; mod azure_disk_volume_source; -pub use self::azure_disk_volume_source::{ - AzureDiskVolumeSource, -}; +pub use self::azure_disk_volume_source::AzureDiskVolumeSource; mod azure_file_persistent_volume_source; -pub use self::azure_file_persistent_volume_source::{ - AzureFilePersistentVolumeSource, -}; +pub use self::azure_file_persistent_volume_source::AzureFilePersistentVolumeSource; mod azure_file_volume_source; -pub use self::azure_file_volume_source::{ - AzureFileVolumeSource, -}; +pub use self::azure_file_volume_source::AzureFileVolumeSource; mod binding; -pub use self::binding::{ - Binding, - CreateNamespacedBindingOptional, CreateNamespacedBindingResponse, - CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse, -}; +pub use self::binding::Binding; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedBindingOptional, CreateNamespacedBindingResponse}; +#[cfg(feature = "api")] pub use self::binding::{CreateNamespacedPodBindingOptional, CreateNamespacedPodBindingResponse}; mod csi_persistent_volume_source; -pub use self::csi_persistent_volume_source::{ - CSIPersistentVolumeSource, -}; +pub use self::csi_persistent_volume_source::CSIPersistentVolumeSource; mod capabilities; -pub use self::capabilities::{ - Capabilities, -}; +pub use self::capabilities::Capabilities; mod ceph_fs_persistent_volume_source; -pub use self::ceph_fs_persistent_volume_source::{ - CephFSPersistentVolumeSource, -}; +pub use self::ceph_fs_persistent_volume_source::CephFSPersistentVolumeSource; mod ceph_fs_volume_source; -pub use self::ceph_fs_volume_source::{ - CephFSVolumeSource, -}; +pub use self::ceph_fs_volume_source::CephFSVolumeSource; mod cinder_volume_source; -pub use self::cinder_volume_source::{ - CinderVolumeSource, -}; +pub use self::cinder_volume_source::CinderVolumeSource; mod client_ip_config; -pub use self::client_ip_config::{ - ClientIPConfig, -}; +pub use self::client_ip_config::ClientIPConfig; mod component_condition; -pub use self::component_condition::{ - ComponentCondition, -}; +pub use self::component_condition::ComponentCondition; mod component_status; -pub use self::component_status::{ - ComponentStatus, - ListComponentStatusResponse, - ReadComponentStatusOptional, ReadComponentStatusResponse, - WatchComponentStatusResponse, -}; +pub use self::component_status::ComponentStatus; +#[cfg(feature = "api")] pub use self::component_status::ListComponentStatusResponse; +#[cfg(feature = "api")] pub use self::component_status::{ReadComponentStatusOptional, ReadComponentStatusResponse}; +#[cfg(feature = "api")] pub use self::component_status::WatchComponentStatusResponse; mod component_status_list; -pub use self::component_status_list::{ - ComponentStatusList, -}; +pub use self::component_status_list::ComponentStatusList; mod config_map; -pub use self::config_map::{ - ConfigMap, - CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse, - DeleteCollectionNamespacedConfigMapResponse, - DeleteNamespacedConfigMapResponse, - ListConfigMapForAllNamespacesResponse, - ListNamespacedConfigMapResponse, - PatchNamespacedConfigMapResponse, - ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse, - ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse, - WatchConfigMapForAllNamespacesResponse, - WatchNamespacedConfigMapResponse, -}; +pub use self::config_map::ConfigMap; +#[cfg(feature = "api")] pub use self::config_map::{CreateNamespacedConfigMapOptional, CreateNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::DeleteCollectionNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::DeleteNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::ListConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::ListNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::PatchNamespacedConfigMapResponse; +#[cfg(feature = "api")] pub use self::config_map::{ReadNamespacedConfigMapOptional, ReadNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::{ReplaceNamespacedConfigMapOptional, ReplaceNamespacedConfigMapResponse}; +#[cfg(feature = "api")] pub use self::config_map::WatchConfigMapForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::config_map::WatchNamespacedConfigMapResponse; mod config_map_env_source; -pub use self::config_map_env_source::{ - ConfigMapEnvSource, -}; +pub use self::config_map_env_source::ConfigMapEnvSource; mod config_map_key_selector; -pub use self::config_map_key_selector::{ - ConfigMapKeySelector, -}; +pub use self::config_map_key_selector::ConfigMapKeySelector; mod config_map_list; -pub use self::config_map_list::{ - ConfigMapList, -}; +pub use self::config_map_list::ConfigMapList; mod config_map_projection; -pub use self::config_map_projection::{ - ConfigMapProjection, -}; +pub use self::config_map_projection::ConfigMapProjection; mod config_map_volume_source; -pub use self::config_map_volume_source::{ - ConfigMapVolumeSource, -}; +pub use self::config_map_volume_source::ConfigMapVolumeSource; mod container; -pub use self::container::{ - Container, -}; +pub use self::container::Container; mod container_image; -pub use self::container_image::{ - ContainerImage, -}; +pub use self::container_image::ContainerImage; mod container_port; -pub use self::container_port::{ - ContainerPort, -}; +pub use self::container_port::ContainerPort; mod container_state; -pub use self::container_state::{ - ContainerState, -}; +pub use self::container_state::ContainerState; mod container_state_running; -pub use self::container_state_running::{ - ContainerStateRunning, -}; +pub use self::container_state_running::ContainerStateRunning; mod container_state_terminated; -pub use self::container_state_terminated::{ - ContainerStateTerminated, -}; +pub use self::container_state_terminated::ContainerStateTerminated; mod container_state_waiting; -pub use self::container_state_waiting::{ - ContainerStateWaiting, -}; +pub use self::container_state_waiting::ContainerStateWaiting; mod container_status; -pub use self::container_status::{ - ContainerStatus, -}; +pub use self::container_status::ContainerStatus; mod daemon_endpoint; -pub use self::daemon_endpoint::{ - DaemonEndpoint, -}; +pub use self::daemon_endpoint::DaemonEndpoint; mod downward_api_projection; -pub use self::downward_api_projection::{ - DownwardAPIProjection, -}; +pub use self::downward_api_projection::DownwardAPIProjection; mod downward_api_volume_file; -pub use self::downward_api_volume_file::{ - DownwardAPIVolumeFile, -}; +pub use self::downward_api_volume_file::DownwardAPIVolumeFile; mod downward_api_volume_source; -pub use self::downward_api_volume_source::{ - DownwardAPIVolumeSource, -}; +pub use self::downward_api_volume_source::DownwardAPIVolumeSource; mod empty_dir_volume_source; -pub use self::empty_dir_volume_source::{ - EmptyDirVolumeSource, -}; +pub use self::empty_dir_volume_source::EmptyDirVolumeSource; mod endpoint_address; -pub use self::endpoint_address::{ - EndpointAddress, -}; +pub use self::endpoint_address::EndpointAddress; mod endpoint_port; -pub use self::endpoint_port::{ - EndpointPort, -}; +pub use self::endpoint_port::EndpointPort; mod endpoint_subset; -pub use self::endpoint_subset::{ - EndpointSubset, -}; +pub use self::endpoint_subset::EndpointSubset; mod endpoints; -pub use self::endpoints::{ - Endpoints, - CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse, - DeleteCollectionNamespacedEndpointsResponse, - DeleteNamespacedEndpointsResponse, - ListEndpointsForAllNamespacesResponse, - ListNamespacedEndpointsResponse, - PatchNamespacedEndpointsResponse, - ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse, - ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse, - WatchEndpointsForAllNamespacesResponse, - WatchNamespacedEndpointsResponse, -}; +pub use self::endpoints::Endpoints; +#[cfg(feature = "api")] pub use self::endpoints::{CreateNamespacedEndpointsOptional, CreateNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::DeleteCollectionNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::DeleteNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::ListNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::PatchNamespacedEndpointsResponse; +#[cfg(feature = "api")] pub use self::endpoints::{ReadNamespacedEndpointsOptional, ReadNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::{ReplaceNamespacedEndpointsOptional, ReplaceNamespacedEndpointsResponse}; +#[cfg(feature = "api")] pub use self::endpoints::WatchEndpointsForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::endpoints::WatchNamespacedEndpointsResponse; mod endpoints_list; -pub use self::endpoints_list::{ - EndpointsList, -}; +pub use self::endpoints_list::EndpointsList; mod env_from_source; -pub use self::env_from_source::{ - EnvFromSource, -}; +pub use self::env_from_source::EnvFromSource; mod env_var; -pub use self::env_var::{ - EnvVar, -}; +pub use self::env_var::EnvVar; mod env_var_source; -pub use self::env_var_source::{ - EnvVarSource, -}; +pub use self::env_var_source::EnvVarSource; mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; mod event_source; -pub use self::event_source::{ - EventSource, -}; +pub use self::event_source::EventSource; mod exec_action; -pub use self::exec_action::{ - ExecAction, -}; +pub use self::exec_action::ExecAction; mod fc_volume_source; -pub use self::fc_volume_source::{ - FCVolumeSource, -}; +pub use self::fc_volume_source::FCVolumeSource; mod flex_volume_source; -pub use self::flex_volume_source::{ - FlexVolumeSource, -}; +pub use self::flex_volume_source::FlexVolumeSource; mod flocker_volume_source; -pub use self::flocker_volume_source::{ - FlockerVolumeSource, -}; +pub use self::flocker_volume_source::FlockerVolumeSource; mod gce_persistent_disk_volume_source; -pub use self::gce_persistent_disk_volume_source::{ - GCEPersistentDiskVolumeSource, -}; +pub use self::gce_persistent_disk_volume_source::GCEPersistentDiskVolumeSource; mod git_repo_volume_source; -pub use self::git_repo_volume_source::{ - GitRepoVolumeSource, -}; +pub use self::git_repo_volume_source::GitRepoVolumeSource; mod glusterfs_volume_source; -pub use self::glusterfs_volume_source::{ - GlusterfsVolumeSource, -}; +pub use self::glusterfs_volume_source::GlusterfsVolumeSource; mod http_get_action; -pub use self::http_get_action::{ - HTTPGetAction, -}; +pub use self::http_get_action::HTTPGetAction; mod http_header; -pub use self::http_header::{ - HTTPHeader, -}; +pub use self::http_header::HTTPHeader; mod handler; -pub use self::handler::{ - Handler, -}; +pub use self::handler::Handler; mod host_alias; -pub use self::host_alias::{ - HostAlias, -}; +pub use self::host_alias::HostAlias; mod host_path_volume_source; -pub use self::host_path_volume_source::{ - HostPathVolumeSource, -}; +pub use self::host_path_volume_source::HostPathVolumeSource; mod iscsi_persistent_volume_source; -pub use self::iscsi_persistent_volume_source::{ - ISCSIPersistentVolumeSource, -}; +pub use self::iscsi_persistent_volume_source::ISCSIPersistentVolumeSource; mod iscsi_volume_source; -pub use self::iscsi_volume_source::{ - ISCSIVolumeSource, -}; +pub use self::iscsi_volume_source::ISCSIVolumeSource; mod key_to_path; -pub use self::key_to_path::{ - KeyToPath, -}; +pub use self::key_to_path::KeyToPath; mod lifecycle; -pub use self::lifecycle::{ - Lifecycle, -}; +pub use self::lifecycle::Lifecycle; mod limit_range; -pub use self::limit_range::{ - LimitRange, - CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse, - DeleteCollectionNamespacedLimitRangeResponse, - DeleteNamespacedLimitRangeResponse, - ListLimitRangeForAllNamespacesResponse, - ListNamespacedLimitRangeResponse, - PatchNamespacedLimitRangeResponse, - ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse, - ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse, - WatchLimitRangeForAllNamespacesResponse, - WatchNamespacedLimitRangeResponse, -}; +pub use self::limit_range::LimitRange; +#[cfg(feature = "api")] pub use self::limit_range::{CreateNamespacedLimitRangeOptional, CreateNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::DeleteCollectionNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::DeleteNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::ListNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::PatchNamespacedLimitRangeResponse; +#[cfg(feature = "api")] pub use self::limit_range::{ReadNamespacedLimitRangeOptional, ReadNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::{ReplaceNamespacedLimitRangeOptional, ReplaceNamespacedLimitRangeResponse}; +#[cfg(feature = "api")] pub use self::limit_range::WatchLimitRangeForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::limit_range::WatchNamespacedLimitRangeResponse; mod limit_range_item; -pub use self::limit_range_item::{ - LimitRangeItem, -}; +pub use self::limit_range_item::LimitRangeItem; mod limit_range_list; -pub use self::limit_range_list::{ - LimitRangeList, -}; +pub use self::limit_range_list::LimitRangeList; mod limit_range_spec; -pub use self::limit_range_spec::{ - LimitRangeSpec, -}; +pub use self::limit_range_spec::LimitRangeSpec; mod load_balancer_ingress; -pub use self::load_balancer_ingress::{ - LoadBalancerIngress, -}; +pub use self::load_balancer_ingress::LoadBalancerIngress; mod load_balancer_status; -pub use self::load_balancer_status::{ - LoadBalancerStatus, -}; +pub use self::load_balancer_status::LoadBalancerStatus; mod local_object_reference; -pub use self::local_object_reference::{ - LocalObjectReference, -}; +pub use self::local_object_reference::LocalObjectReference; mod local_volume_source; -pub use self::local_volume_source::{ - LocalVolumeSource, -}; +pub use self::local_volume_source::LocalVolumeSource; mod nfs_volume_source; -pub use self::nfs_volume_source::{ - NFSVolumeSource, -}; +pub use self::nfs_volume_source::NFSVolumeSource; mod namespace; -pub use self::namespace::{ - Namespace, - CreateNamespaceOptional, CreateNamespaceResponse, - DeleteNamespaceResponse, - ListNamespaceResponse, - PatchNamespaceResponse, - PatchNamespaceStatusResponse, - ReadNamespaceOptional, ReadNamespaceResponse, - ReadNamespaceStatusOptional, ReadNamespaceStatusResponse, - ReplaceNamespaceOptional, ReplaceNamespaceResponse, - ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse, - ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse, - WatchNamespaceResponse, -}; +pub use self::namespace::Namespace; +#[cfg(feature = "api")] pub use self::namespace::{CreateNamespaceOptional, CreateNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::DeleteNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::ListNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceResponse; +#[cfg(feature = "api")] pub use self::namespace::PatchNamespaceStatusResponse; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceOptional, ReadNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReadNamespaceStatusOptional, ReadNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceOptional, ReplaceNamespaceResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceFinalizeOptional, ReplaceNamespaceFinalizeResponse}; +#[cfg(feature = "api")] pub use self::namespace::{ReplaceNamespaceStatusOptional, ReplaceNamespaceStatusResponse}; +#[cfg(feature = "api")] pub use self::namespace::WatchNamespaceResponse; mod namespace_list; -pub use self::namespace_list::{ - NamespaceList, -}; +pub use self::namespace_list::NamespaceList; mod namespace_spec; -pub use self::namespace_spec::{ - NamespaceSpec, -}; +pub use self::namespace_spec::NamespaceSpec; mod namespace_status; -pub use self::namespace_status::{ - NamespaceStatus, -}; +pub use self::namespace_status::NamespaceStatus; mod node; -pub use self::node::{ - Node, - ConnectDeleteNodeProxyOptional, - ConnectDeleteNodeProxyWithPathOptional, - ConnectGetNodeProxyOptional, - ConnectGetNodeProxyWithPathOptional, - ConnectPatchNodeProxyOptional, - ConnectPatchNodeProxyWithPathOptional, - ConnectPostNodeProxyOptional, - ConnectPostNodeProxyWithPathOptional, - ConnectPutNodeProxyOptional, - ConnectPutNodeProxyWithPathOptional, - CreateNodeOptional, CreateNodeResponse, - DeleteCollectionNodeResponse, - DeleteNodeResponse, - ListNodeResponse, - PatchNodeResponse, - PatchNodeStatusResponse, - ProxyDELETENodeResponse, - ProxyDELETENodeWithPathResponse, - ProxyGETNodeResponse, - ProxyGETNodeWithPathResponse, - ProxyPATCHNodeResponse, - ProxyPATCHNodeWithPathResponse, - ProxyPOSTNodeResponse, - ProxyPOSTNodeWithPathResponse, - ProxyPUTNodeResponse, - ProxyPUTNodeWithPathResponse, - ReadNodeOptional, ReadNodeResponse, - ReadNodeStatusOptional, ReadNodeStatusResponse, - ReplaceNodeOptional, ReplaceNodeResponse, - ReplaceNodeStatusOptional, ReplaceNodeStatusResponse, - WatchNodeResponse, -}; +pub use self::node::Node; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectDeleteNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectGetNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPatchNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPostNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyOptional; +#[cfg(feature = "api")] pub use self::node::ConnectPutNodeProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::node::{CreateNodeOptional, CreateNodeResponse}; +#[cfg(feature = "api")] pub use self::node::DeleteCollectionNodeResponse; +#[cfg(feature = "api")] pub use self::node::DeleteNodeResponse; +#[cfg(feature = "api")] pub use self::node::ListNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeResponse; +#[cfg(feature = "api")] pub use self::node::PatchNodeStatusResponse; +#[cfg(feature = "api")] pub use self::node::ProxyDELETENodeResponse; +#[cfg(feature = "api")] pub use self::node::ProxyDELETENodeWithPathResponse; +#[cfg(feature = "api")] pub use self::node::ProxyGETNodeResponse; +#[cfg(feature = "api")] pub use self::node::ProxyGETNodeWithPathResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPATCHNodeResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPATCHNodeWithPathResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPOSTNodeResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPOSTNodeWithPathResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPUTNodeResponse; +#[cfg(feature = "api")] pub use self::node::ProxyPUTNodeWithPathResponse; +#[cfg(feature = "api")] pub use self::node::{ReadNodeOptional, ReadNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReadNodeStatusOptional, ReadNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeOptional, ReplaceNodeResponse}; +#[cfg(feature = "api")] pub use self::node::{ReplaceNodeStatusOptional, ReplaceNodeStatusResponse}; +#[cfg(feature = "api")] pub use self::node::WatchNodeResponse; mod node_address; -pub use self::node_address::{ - NodeAddress, -}; +pub use self::node_address::NodeAddress; mod node_affinity; -pub use self::node_affinity::{ - NodeAffinity, -}; +pub use self::node_affinity::NodeAffinity; mod node_condition; -pub use self::node_condition::{ - NodeCondition, -}; +pub use self::node_condition::NodeCondition; mod node_config_source; -pub use self::node_config_source::{ - NodeConfigSource, -}; +pub use self::node_config_source::NodeConfigSource; mod node_daemon_endpoints; -pub use self::node_daemon_endpoints::{ - NodeDaemonEndpoints, -}; +pub use self::node_daemon_endpoints::NodeDaemonEndpoints; mod node_list; -pub use self::node_list::{ - NodeList, -}; +pub use self::node_list::NodeList; mod node_selector; -pub use self::node_selector::{ - NodeSelector, -}; +pub use self::node_selector::NodeSelector; mod node_selector_requirement; -pub use self::node_selector_requirement::{ - NodeSelectorRequirement, -}; +pub use self::node_selector_requirement::NodeSelectorRequirement; mod node_selector_term; -pub use self::node_selector_term::{ - NodeSelectorTerm, -}; +pub use self::node_selector_term::NodeSelectorTerm; mod node_spec; -pub use self::node_spec::{ - NodeSpec, -}; +pub use self::node_spec::NodeSpec; mod node_status; -pub use self::node_status::{ - NodeStatus, -}; +pub use self::node_status::NodeStatus; mod node_system_info; -pub use self::node_system_info::{ - NodeSystemInfo, -}; +pub use self::node_system_info::NodeSystemInfo; mod object_field_selector; -pub use self::object_field_selector::{ - ObjectFieldSelector, -}; +pub use self::object_field_selector::ObjectFieldSelector; mod object_reference; -pub use self::object_reference::{ - ObjectReference, -}; +pub use self::object_reference::ObjectReference; mod persistent_volume; -pub use self::persistent_volume::{ - PersistentVolume, - CreatePersistentVolumeOptional, CreatePersistentVolumeResponse, - DeleteCollectionPersistentVolumeResponse, - DeletePersistentVolumeResponse, - ListPersistentVolumeResponse, - PatchPersistentVolumeResponse, - PatchPersistentVolumeStatusResponse, - ReadPersistentVolumeOptional, ReadPersistentVolumeResponse, - ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse, - ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse, - ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse, - WatchPersistentVolumeResponse, -}; +pub use self::persistent_volume::PersistentVolume; +#[cfg(feature = "api")] pub use self::persistent_volume::{CreatePersistentVolumeOptional, CreatePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::DeleteCollectionPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::DeletePersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::ListPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::PatchPersistentVolumeStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeOptional, ReadPersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReadPersistentVolumeStatusOptional, ReadPersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeOptional, ReplacePersistentVolumeResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::{ReplacePersistentVolumeStatusOptional, ReplacePersistentVolumeStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume::WatchPersistentVolumeResponse; mod persistent_volume_claim; -pub use self::persistent_volume_claim::{ - PersistentVolumeClaim, - CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse, - DeleteCollectionNamespacedPersistentVolumeClaimResponse, - DeleteNamespacedPersistentVolumeClaimResponse, - ListNamespacedPersistentVolumeClaimResponse, - ListPersistentVolumeClaimForAllNamespacesResponse, - PatchNamespacedPersistentVolumeClaimResponse, - PatchNamespacedPersistentVolumeClaimStatusResponse, - ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse, - ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse, - ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse, - ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse, - WatchNamespacedPersistentVolumeClaimResponse, - WatchPersistentVolumeClaimForAllNamespacesResponse, -}; +pub use self::persistent_volume_claim::PersistentVolumeClaim; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{CreateNamespacedPersistentVolumeClaimOptional, CreateNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteCollectionNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::DeleteNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::ListPersistentVolumeClaimForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::PatchNamespacedPersistentVolumeClaimStatusResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimOptional, ReadNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReadNamespacedPersistentVolumeClaimStatusOptional, ReadNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimOptional, ReplaceNamespacedPersistentVolumeClaimResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::{ReplaceNamespacedPersistentVolumeClaimStatusOptional, ReplaceNamespacedPersistentVolumeClaimStatusResponse}; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchNamespacedPersistentVolumeClaimResponse; +#[cfg(feature = "api")] pub use self::persistent_volume_claim::WatchPersistentVolumeClaimForAllNamespacesResponse; mod persistent_volume_claim_condition; -pub use self::persistent_volume_claim_condition::{ - PersistentVolumeClaimCondition, -}; +pub use self::persistent_volume_claim_condition::PersistentVolumeClaimCondition; mod persistent_volume_claim_list; -pub use self::persistent_volume_claim_list::{ - PersistentVolumeClaimList, -}; +pub use self::persistent_volume_claim_list::PersistentVolumeClaimList; mod persistent_volume_claim_spec; -pub use self::persistent_volume_claim_spec::{ - PersistentVolumeClaimSpec, -}; +pub use self::persistent_volume_claim_spec::PersistentVolumeClaimSpec; mod persistent_volume_claim_status; -pub use self::persistent_volume_claim_status::{ - PersistentVolumeClaimStatus, -}; +pub use self::persistent_volume_claim_status::PersistentVolumeClaimStatus; mod persistent_volume_claim_volume_source; -pub use self::persistent_volume_claim_volume_source::{ - PersistentVolumeClaimVolumeSource, -}; +pub use self::persistent_volume_claim_volume_source::PersistentVolumeClaimVolumeSource; mod persistent_volume_list; -pub use self::persistent_volume_list::{ - PersistentVolumeList, -}; +pub use self::persistent_volume_list::PersistentVolumeList; mod persistent_volume_spec; -pub use self::persistent_volume_spec::{ - PersistentVolumeSpec, -}; +pub use self::persistent_volume_spec::PersistentVolumeSpec; mod persistent_volume_status; -pub use self::persistent_volume_status::{ - PersistentVolumeStatus, -}; +pub use self::persistent_volume_status::PersistentVolumeStatus; mod photon_persistent_disk_volume_source; -pub use self::photon_persistent_disk_volume_source::{ - PhotonPersistentDiskVolumeSource, -}; +pub use self::photon_persistent_disk_volume_source::PhotonPersistentDiskVolumeSource; mod pod; -pub use self::pod::{ - Pod, - ConnectDeleteNamespacedPodProxyOptional, - ConnectDeleteNamespacedPodProxyWithPathOptional, - ConnectGetNamespacedPodAttachOptional, - ConnectGetNamespacedPodExecOptional, - ConnectGetNamespacedPodPortforwardOptional, - ConnectGetNamespacedPodProxyOptional, - ConnectGetNamespacedPodProxyWithPathOptional, - ConnectPatchNamespacedPodProxyOptional, - ConnectPatchNamespacedPodProxyWithPathOptional, - ConnectPostNamespacedPodAttachOptional, - ConnectPostNamespacedPodExecOptional, - ConnectPostNamespacedPodPortforwardOptional, - ConnectPostNamespacedPodProxyOptional, - ConnectPostNamespacedPodProxyWithPathOptional, - ConnectPutNamespacedPodProxyOptional, - ConnectPutNamespacedPodProxyWithPathOptional, - CreateNamespacedPodOptional, CreateNamespacedPodResponse, - DeleteCollectionNamespacedPodResponse, - DeleteNamespacedPodResponse, - ListNamespacedPodResponse, - ListPodForAllNamespacesResponse, - PatchNamespacedPodResponse, - PatchNamespacedPodStatusResponse, - ProxyDELETENamespacedPodResponse, - ProxyDELETENamespacedPodWithPathResponse, - ProxyGETNamespacedPodResponse, - ProxyGETNamespacedPodWithPathResponse, - ProxyPATCHNamespacedPodResponse, - ProxyPATCHNamespacedPodWithPathResponse, - ProxyPOSTNamespacedPodResponse, - ProxyPOSTNamespacedPodWithPathResponse, - ProxyPUTNamespacedPodResponse, - ProxyPUTNamespacedPodWithPathResponse, - ReadNamespacedPodOptional, ReadNamespacedPodResponse, - ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse, - ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse, - ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse, - ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse, - WatchNamespacedPodResponse, - WatchPodForAllNamespacesResponse, -}; +pub use self::pod::Pod; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectDeleteNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectGetNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPatchNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodAttachOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodExecOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodPortforwardOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPostNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyOptional; +#[cfg(feature = "api")] pub use self::pod::ConnectPutNamespacedPodProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::pod::{CreateNamespacedPodOptional, CreateNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::DeleteCollectionNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::DeleteNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ListPodForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::PatchNamespacedPodStatusResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyDELETENamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyDELETENamespacedPodWithPathResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyGETNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyGETNamespacedPodWithPathResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPATCHNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPATCHNamespacedPodWithPathResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPOSTNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPOSTNamespacedPodWithPathResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPUTNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::ProxyPUTNamespacedPodWithPathResponse; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodOptional, ReadNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodLogOptional, ReadNamespacedPodLogResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReadNamespacedPodStatusOptional, ReadNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodOptional, ReplaceNamespacedPodResponse}; +#[cfg(feature = "api")] pub use self::pod::{ReplaceNamespacedPodStatusOptional, ReplaceNamespacedPodStatusResponse}; +#[cfg(feature = "api")] pub use self::pod::WatchNamespacedPodResponse; +#[cfg(feature = "api")] pub use self::pod::WatchPodForAllNamespacesResponse; mod pod_affinity; -pub use self::pod_affinity::{ - PodAffinity, -}; +pub use self::pod_affinity::PodAffinity; mod pod_affinity_term; -pub use self::pod_affinity_term::{ - PodAffinityTerm, -}; +pub use self::pod_affinity_term::PodAffinityTerm; mod pod_anti_affinity; -pub use self::pod_anti_affinity::{ - PodAntiAffinity, -}; +pub use self::pod_anti_affinity::PodAntiAffinity; mod pod_condition; -pub use self::pod_condition::{ - PodCondition, -}; +pub use self::pod_condition::PodCondition; mod pod_dns_config; -pub use self::pod_dns_config::{ - PodDNSConfig, -}; +pub use self::pod_dns_config::PodDNSConfig; mod pod_dns_config_option; -pub use self::pod_dns_config_option::{ - PodDNSConfigOption, -}; +pub use self::pod_dns_config_option::PodDNSConfigOption; mod pod_list; -pub use self::pod_list::{ - PodList, -}; +pub use self::pod_list::PodList; mod pod_security_context; -pub use self::pod_security_context::{ - PodSecurityContext, -}; +pub use self::pod_security_context::PodSecurityContext; mod pod_spec; -pub use self::pod_spec::{ - PodSpec, -}; +pub use self::pod_spec::PodSpec; mod pod_status; -pub use self::pod_status::{ - PodStatus, -}; +pub use self::pod_status::PodStatus; mod pod_template; -pub use self::pod_template::{ - PodTemplate, - CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse, - DeleteCollectionNamespacedPodTemplateResponse, - DeleteNamespacedPodTemplateResponse, - ListNamespacedPodTemplateResponse, - ListPodTemplateForAllNamespacesResponse, - PatchNamespacedPodTemplateResponse, - ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse, - ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse, - WatchNamespacedPodTemplateResponse, - WatchPodTemplateForAllNamespacesResponse, -}; +pub use self::pod_template::PodTemplate; +#[cfg(feature = "api")] pub use self::pod_template::{CreateNamespacedPodTemplateOptional, CreateNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::DeleteCollectionNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::DeleteNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::ListPodTemplateForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_template::PatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::{ReadNamespacedPodTemplateOptional, ReadNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::{ReplaceNamespacedPodTemplateOptional, ReplaceNamespacedPodTemplateResponse}; +#[cfg(feature = "api")] pub use self::pod_template::WatchNamespacedPodTemplateResponse; +#[cfg(feature = "api")] pub use self::pod_template::WatchPodTemplateForAllNamespacesResponse; mod pod_template_list; -pub use self::pod_template_list::{ - PodTemplateList, -}; +pub use self::pod_template_list::PodTemplateList; mod pod_template_spec; -pub use self::pod_template_spec::{ - PodTemplateSpec, -}; +pub use self::pod_template_spec::PodTemplateSpec; mod portworx_volume_source; -pub use self::portworx_volume_source::{ - PortworxVolumeSource, -}; +pub use self::portworx_volume_source::PortworxVolumeSource; mod preferred_scheduling_term; -pub use self::preferred_scheduling_term::{ - PreferredSchedulingTerm, -}; +pub use self::preferred_scheduling_term::PreferredSchedulingTerm; mod probe; -pub use self::probe::{ - Probe, -}; +pub use self::probe::Probe; mod projected_volume_source; -pub use self::projected_volume_source::{ - ProjectedVolumeSource, -}; +pub use self::projected_volume_source::ProjectedVolumeSource; mod quobyte_volume_source; -pub use self::quobyte_volume_source::{ - QuobyteVolumeSource, -}; +pub use self::quobyte_volume_source::QuobyteVolumeSource; mod rbd_persistent_volume_source; -pub use self::rbd_persistent_volume_source::{ - RBDPersistentVolumeSource, -}; +pub use self::rbd_persistent_volume_source::RBDPersistentVolumeSource; mod rbd_volume_source; -pub use self::rbd_volume_source::{ - RBDVolumeSource, -}; +pub use self::rbd_volume_source::RBDVolumeSource; mod replication_controller; -pub use self::replication_controller::{ - ReplicationController, - CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse, - DeleteCollectionNamespacedReplicationControllerResponse, - DeleteNamespacedReplicationControllerResponse, - ListNamespacedReplicationControllerResponse, - ListReplicationControllerForAllNamespacesResponse, - PatchNamespacedReplicationControllerResponse, - PatchNamespacedReplicationControllerStatusResponse, - ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse, - ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse, - ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse, - ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse, - WatchNamespacedReplicationControllerResponse, - WatchReplicationControllerForAllNamespacesResponse, -}; +pub use self::replication_controller::ReplicationController; +#[cfg(feature = "api")] pub use self::replication_controller::{CreateNamespacedReplicationControllerOptional, CreateNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteCollectionNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::DeleteNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::ListReplicationControllerForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::PatchNamespacedReplicationControllerStatusResponse; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerOptional, ReadNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReadNamespacedReplicationControllerStatusOptional, ReadNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerOptional, ReplaceNamespacedReplicationControllerResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::{ReplaceNamespacedReplicationControllerStatusOptional, ReplaceNamespacedReplicationControllerStatusResponse}; +#[cfg(feature = "api")] pub use self::replication_controller::WatchNamespacedReplicationControllerResponse; +#[cfg(feature = "api")] pub use self::replication_controller::WatchReplicationControllerForAllNamespacesResponse; mod replication_controller_condition; -pub use self::replication_controller_condition::{ - ReplicationControllerCondition, -}; +pub use self::replication_controller_condition::ReplicationControllerCondition; mod replication_controller_list; -pub use self::replication_controller_list::{ - ReplicationControllerList, -}; +pub use self::replication_controller_list::ReplicationControllerList; mod replication_controller_spec; -pub use self::replication_controller_spec::{ - ReplicationControllerSpec, -}; +pub use self::replication_controller_spec::ReplicationControllerSpec; mod replication_controller_status; -pub use self::replication_controller_status::{ - ReplicationControllerStatus, -}; +pub use self::replication_controller_status::ReplicationControllerStatus; mod resource_field_selector; -pub use self::resource_field_selector::{ - ResourceFieldSelector, -}; +pub use self::resource_field_selector::ResourceFieldSelector; mod resource_quota; -pub use self::resource_quota::{ - ResourceQuota, - CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse, - DeleteCollectionNamespacedResourceQuotaResponse, - DeleteNamespacedResourceQuotaResponse, - ListNamespacedResourceQuotaResponse, - ListResourceQuotaForAllNamespacesResponse, - PatchNamespacedResourceQuotaResponse, - PatchNamespacedResourceQuotaStatusResponse, - ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse, - ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse, - ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse, - ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse, - WatchNamespacedResourceQuotaResponse, - WatchResourceQuotaForAllNamespacesResponse, -}; +pub use self::resource_quota::ResourceQuota; +#[cfg(feature = "api")] pub use self::resource_quota::{CreateNamespacedResourceQuotaOptional, CreateNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteCollectionNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::DeleteNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::ListResourceQuotaForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::PatchNamespacedResourceQuotaStatusResponse; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaOptional, ReadNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReadNamespacedResourceQuotaStatusOptional, ReadNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaOptional, ReplaceNamespacedResourceQuotaResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::{ReplaceNamespacedResourceQuotaStatusOptional, ReplaceNamespacedResourceQuotaStatusResponse}; +#[cfg(feature = "api")] pub use self::resource_quota::WatchNamespacedResourceQuotaResponse; +#[cfg(feature = "api")] pub use self::resource_quota::WatchResourceQuotaForAllNamespacesResponse; mod resource_quota_list; -pub use self::resource_quota_list::{ - ResourceQuotaList, -}; +pub use self::resource_quota_list::ResourceQuotaList; mod resource_quota_spec; -pub use self::resource_quota_spec::{ - ResourceQuotaSpec, -}; +pub use self::resource_quota_spec::ResourceQuotaSpec; mod resource_quota_status; -pub use self::resource_quota_status::{ - ResourceQuotaStatus, -}; +pub use self::resource_quota_status::ResourceQuotaStatus; mod resource_requirements; -pub use self::resource_requirements::{ - ResourceRequirements, -}; +pub use self::resource_requirements::ResourceRequirements; mod se_linux_options; -pub use self::se_linux_options::{ - SELinuxOptions, -}; +pub use self::se_linux_options::SELinuxOptions; mod scale_io_persistent_volume_source; -pub use self::scale_io_persistent_volume_source::{ - ScaleIOPersistentVolumeSource, -}; +pub use self::scale_io_persistent_volume_source::ScaleIOPersistentVolumeSource; mod scale_io_volume_source; -pub use self::scale_io_volume_source::{ - ScaleIOVolumeSource, -}; +pub use self::scale_io_volume_source::ScaleIOVolumeSource; mod secret; -pub use self::secret::{ - Secret, - CreateNamespacedSecretOptional, CreateNamespacedSecretResponse, - DeleteCollectionNamespacedSecretResponse, - DeleteNamespacedSecretResponse, - ListNamespacedSecretResponse, - ListSecretForAllNamespacesResponse, - PatchNamespacedSecretResponse, - ReadNamespacedSecretOptional, ReadNamespacedSecretResponse, - ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse, - WatchNamespacedSecretResponse, - WatchSecretForAllNamespacesResponse, -}; +pub use self::secret::Secret; +#[cfg(feature = "api")] pub use self::secret::{CreateNamespacedSecretOptional, CreateNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::DeleteCollectionNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::DeleteNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::ListSecretForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::secret::PatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::{ReadNamespacedSecretOptional, ReadNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::{ReplaceNamespacedSecretOptional, ReplaceNamespacedSecretResponse}; +#[cfg(feature = "api")] pub use self::secret::WatchNamespacedSecretResponse; +#[cfg(feature = "api")] pub use self::secret::WatchSecretForAllNamespacesResponse; mod secret_env_source; -pub use self::secret_env_source::{ - SecretEnvSource, -}; +pub use self::secret_env_source::SecretEnvSource; mod secret_key_selector; -pub use self::secret_key_selector::{ - SecretKeySelector, -}; +pub use self::secret_key_selector::SecretKeySelector; mod secret_list; -pub use self::secret_list::{ - SecretList, -}; +pub use self::secret_list::SecretList; mod secret_projection; -pub use self::secret_projection::{ - SecretProjection, -}; +pub use self::secret_projection::SecretProjection; mod secret_reference; -pub use self::secret_reference::{ - SecretReference, -}; +pub use self::secret_reference::SecretReference; mod secret_volume_source; -pub use self::secret_volume_source::{ - SecretVolumeSource, -}; +pub use self::secret_volume_source::SecretVolumeSource; mod security_context; -pub use self::security_context::{ - SecurityContext, -}; +pub use self::security_context::SecurityContext; mod service; -pub use self::service::{ - Service, - ConnectDeleteNamespacedServiceProxyOptional, - ConnectDeleteNamespacedServiceProxyWithPathOptional, - ConnectGetNamespacedServiceProxyOptional, - ConnectGetNamespacedServiceProxyWithPathOptional, - ConnectPatchNamespacedServiceProxyOptional, - ConnectPatchNamespacedServiceProxyWithPathOptional, - ConnectPostNamespacedServiceProxyOptional, - ConnectPostNamespacedServiceProxyWithPathOptional, - ConnectPutNamespacedServiceProxyOptional, - ConnectPutNamespacedServiceProxyWithPathOptional, - CreateNamespacedServiceOptional, CreateNamespacedServiceResponse, - DeleteNamespacedServiceOptional, DeleteNamespacedServiceResponse, - ListNamespacedServiceResponse, - ListServiceForAllNamespacesResponse, - PatchNamespacedServiceResponse, - PatchNamespacedServiceStatusResponse, - ProxyDELETENamespacedServiceResponse, - ProxyDELETENamespacedServiceWithPathResponse, - ProxyGETNamespacedServiceResponse, - ProxyGETNamespacedServiceWithPathResponse, - ProxyPATCHNamespacedServiceResponse, - ProxyPATCHNamespacedServiceWithPathResponse, - ProxyPOSTNamespacedServiceResponse, - ProxyPOSTNamespacedServiceWithPathResponse, - ProxyPUTNamespacedServiceResponse, - ProxyPUTNamespacedServiceWithPathResponse, - ReadNamespacedServiceOptional, ReadNamespacedServiceResponse, - ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse, - ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse, - ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse, - WatchNamespacedServiceResponse, - WatchServiceForAllNamespacesResponse, -}; +pub use self::service::Service; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectDeleteNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectGetNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPatchNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPostNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyOptional; +#[cfg(feature = "api")] pub use self::service::ConnectPutNamespacedServiceProxyWithPathOptional; +#[cfg(feature = "api")] pub use self::service::{CreateNamespacedServiceOptional, CreateNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{DeleteNamespacedServiceOptional, DeleteNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::ListNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ListServiceForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::PatchNamespacedServiceStatusResponse; +#[cfg(feature = "api")] pub use self::service::ProxyDELETENamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ProxyDELETENamespacedServiceWithPathResponse; +#[cfg(feature = "api")] pub use self::service::ProxyGETNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ProxyGETNamespacedServiceWithPathResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPATCHNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPATCHNamespacedServiceWithPathResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPOSTNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPOSTNamespacedServiceWithPathResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPUTNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::ProxyPUTNamespacedServiceWithPathResponse; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceOptional, ReadNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReadNamespacedServiceStatusOptional, ReadNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceOptional, ReplaceNamespacedServiceResponse}; +#[cfg(feature = "api")] pub use self::service::{ReplaceNamespacedServiceStatusOptional, ReplaceNamespacedServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::service::WatchNamespacedServiceResponse; +#[cfg(feature = "api")] pub use self::service::WatchServiceForAllNamespacesResponse; mod service_account; -pub use self::service_account::{ - ServiceAccount, - CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse, - DeleteCollectionNamespacedServiceAccountResponse, - DeleteNamespacedServiceAccountResponse, - ListNamespacedServiceAccountResponse, - ListServiceAccountForAllNamespacesResponse, - PatchNamespacedServiceAccountResponse, - ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse, - ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse, - WatchNamespacedServiceAccountResponse, - WatchServiceAccountForAllNamespacesResponse, -}; +pub use self::service_account::ServiceAccount; +#[cfg(feature = "api")] pub use self::service_account::{CreateNamespacedServiceAccountOptional, CreateNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::DeleteCollectionNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::DeleteNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::ListServiceAccountForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::service_account::PatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::{ReadNamespacedServiceAccountOptional, ReadNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::{ReplaceNamespacedServiceAccountOptional, ReplaceNamespacedServiceAccountResponse}; +#[cfg(feature = "api")] pub use self::service_account::WatchNamespacedServiceAccountResponse; +#[cfg(feature = "api")] pub use self::service_account::WatchServiceAccountForAllNamespacesResponse; mod service_account_list; -pub use self::service_account_list::{ - ServiceAccountList, -}; +pub use self::service_account_list::ServiceAccountList; mod service_list; -pub use self::service_list::{ - ServiceList, -}; +pub use self::service_list::ServiceList; mod service_port; -pub use self::service_port::{ - ServicePort, -}; +pub use self::service_port::ServicePort; mod service_spec; -pub use self::service_spec::{ - ServiceSpec, -}; +pub use self::service_spec::ServiceSpec; mod service_status; -pub use self::service_status::{ - ServiceStatus, -}; +pub use self::service_status::ServiceStatus; mod session_affinity_config; -pub use self::session_affinity_config::{ - SessionAffinityConfig, -}; +pub use self::session_affinity_config::SessionAffinityConfig; mod storage_os_persistent_volume_source; -pub use self::storage_os_persistent_volume_source::{ - StorageOSPersistentVolumeSource, -}; +pub use self::storage_os_persistent_volume_source::StorageOSPersistentVolumeSource; mod storage_os_volume_source; -pub use self::storage_os_volume_source::{ - StorageOSVolumeSource, -}; +pub use self::storage_os_volume_source::StorageOSVolumeSource; mod tcp_socket_action; -pub use self::tcp_socket_action::{ - TCPSocketAction, -}; +pub use self::tcp_socket_action::TCPSocketAction; mod taint; -pub use self::taint::{ - Taint, -}; +pub use self::taint::Taint; mod toleration; -pub use self::toleration::{ - Toleration, -}; +pub use self::toleration::Toleration; mod volume; -pub use self::volume::{ - Volume, -}; +pub use self::volume::Volume; mod volume_device; -pub use self::volume_device::{ - VolumeDevice, -}; +pub use self::volume_device::VolumeDevice; mod volume_mount; -pub use self::volume_mount::{ - VolumeMount, -}; +pub use self::volume_mount::VolumeMount; mod volume_projection; -pub use self::volume_projection::{ - VolumeProjection, -}; +pub use self::volume_projection::VolumeProjection; mod vsphere_virtual_disk_volume_source; -pub use self::vsphere_virtual_disk_volume_source::{ - VsphereVirtualDiskVolumeSource, -}; +pub use self::vsphere_virtual_disk_volume_source::VsphereVirtualDiskVolumeSource; mod weighted_pod_affinity_term; -pub use self::weighted_pod_affinity_term::{ - WeightedPodAffinityTerm, -}; +pub use self::weighted_pod_affinity_term::WeightedPodAffinityTerm; diff --git a/src/v1_9/api/core/v1/namespace.rs b/src/v1_9/api/core/v1/namespace.rs index b96719e53e..69e0481923 100644 --- a/src/v1_9/api/core/v1/namespace.rs +++ b/src/v1_9/api/core/v1/namespace.rs @@ -29,6 +29,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespace( body: &crate::v1_9::api::core::v1::Namespace, optional: CreateNamespaceOptional<'_>, @@ -54,6 +55,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespaceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::create_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespaceResponse { Ok(crate::v1_9::api::core::v1::Namespace), @@ -69,6 +72,7 @@ pub enum CreateNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespace( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::delete_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespaceResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespace( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -230,12 +238,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::list_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespaceResponse { Ok(crate::v1_9::api::core::v1::NamespaceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -283,6 +293,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -310,12 +321,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceResponse { Ok(crate::v1_9::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -363,6 +376,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespace_status( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -390,12 +404,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::patch_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespaceStatusResponse { Ok(crate::v1_9::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -441,6 +457,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace( name: &str, optional: ReadNamespaceOptional<'_>, @@ -475,6 +492,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -486,12 +504,14 @@ pub struct ReadNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceResponse { Ok(crate::v1_9::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -537,6 +557,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespace_status( name: &str, optional: ReadNamespaceStatusOptional<'_>, @@ -563,6 +584,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -570,12 +592,14 @@ pub struct ReadNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::read_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespaceStatusResponse { Ok(crate::v1_9::api::core::v1::Namespace), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -623,6 +647,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace( name: &str, body: &crate::v1_9::api::core::v1::Namespace, @@ -651,6 +676,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -658,6 +684,7 @@ pub struct ReplaceNamespaceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceResponse { Ok(crate::v1_9::api::core::v1::Namespace), @@ -665,6 +692,7 @@ pub enum ReplaceNamespaceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -720,6 +748,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_finalize( name: &str, body: &crate::v1_9::api::core::v1::Namespace, @@ -748,6 +777,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceFinalizeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -755,6 +785,7 @@ pub struct ReplaceNamespaceFinalizeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_finalize`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceFinalizeResponse { Ok(crate::v1_9::api::core::v1::Namespace), @@ -762,6 +793,7 @@ pub enum ReplaceNamespaceFinalizeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceFinalizeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -817,6 +849,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespace_status( name: &str, body: &crate::v1_9::api::core::v1::Namespace, @@ -845,6 +878,7 @@ impl Namespace { } /// Optional parameters of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespaceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -852,6 +886,7 @@ pub struct ReplaceNamespaceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::replace_namespace_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespaceStatusResponse { Ok(crate::v1_9::api::core::v1::Namespace), @@ -859,6 +894,7 @@ pub enum ReplaceNamespaceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespaceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -910,6 +946,7 @@ impl Namespace { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespace( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -928,12 +965,14 @@ impl Namespace { } /// Use `::try_from_parts` to parse the HTTP response body of [`Namespace::watch_namespace`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespaceResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespaceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/node.rs b/src/v1_9/api/core/v1/node.rs index c3244e4852..0e4e49957e 100644 --- a/src/v1_9/api/core/v1/node.rs +++ b/src/v1_9/api/core/v1/node.rs @@ -29,6 +29,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy( name: &str, optional: ConnectDeleteNodeProxyOptional<'_>, @@ -52,6 +53,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -76,6 +78,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_node_proxy_with_path( name: &str, path: &str, @@ -101,6 +104,7 @@ impl Node { } /// Optional parameters of [`Node::connect_delete_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -121,6 +125,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy( name: &str, optional: ConnectGetNodeProxyOptional<'_>, @@ -144,6 +149,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -168,6 +174,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_node_proxy_with_path( name: &str, path: &str, @@ -193,6 +200,7 @@ impl Node { } /// Optional parameters of [`Node::connect_get_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -213,6 +221,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy( name: &str, optional: ConnectPatchNodeProxyOptional<'_>, @@ -236,6 +245,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -260,6 +270,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_node_proxy_with_path( name: &str, path: &str, @@ -285,6 +296,7 @@ impl Node { } /// Optional parameters of [`Node::connect_patch_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -305,6 +317,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy( name: &str, optional: ConnectPostNodeProxyOptional<'_>, @@ -328,6 +341,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -352,6 +366,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_node_proxy_with_path( name: &str, path: &str, @@ -377,6 +392,7 @@ impl Node { } /// Optional parameters of [`Node::connect_post_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -397,6 +413,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy( name: &str, optional: ConnectPutNodeProxyOptional<'_>, @@ -420,6 +437,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -444,6 +462,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_node_proxy_with_path( name: &str, path: &str, @@ -469,6 +488,7 @@ impl Node { } /// Optional parameters of [`Node::connect_put_node_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNodeProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to node. @@ -489,6 +509,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_node( body: &crate::v1_9::api::core::v1::Node, optional: CreateNodeOptional<'_>, @@ -514,6 +535,7 @@ impl Node { } /// Optional parameters of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNodeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -521,6 +543,7 @@ pub struct CreateNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::create_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNodeResponse { Ok(crate::v1_9::api::core::v1::Node), @@ -529,6 +552,7 @@ pub enum CreateNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -590,6 +614,7 @@ impl Node { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_node( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -610,6 +635,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_collection_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNodeResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -617,6 +643,7 @@ pub enum DeleteCollectionNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -675,6 +702,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_node( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -694,6 +722,7 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::delete_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNodeResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -701,6 +730,7 @@ pub enum DeleteNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -757,6 +787,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_node( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -775,12 +806,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::list_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNodeResponse { Ok(crate::v1_9::api::core::v1::NodeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -828,6 +861,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -855,12 +889,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeResponse { Ok(crate::v1_9::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -908,6 +944,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_node_status( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -935,12 +972,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::patch_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNodeStatusResponse { Ok(crate::v1_9::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -982,6 +1021,7 @@ impl Node { /// * `name` /// /// name of the Node + #[cfg(feature = "api")] pub fn proxy_delete_node( name: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -999,12 +1039,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_delete_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENodeResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1060,6 +1102,7 @@ impl Node { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_delete_node_with_path( name: &str, path: &str, @@ -1079,12 +1122,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_delete_node_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENodeWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENodeWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1136,6 +1181,7 @@ impl Node { /// * `name` /// /// name of the Node + #[cfg(feature = "api")] pub fn proxy_get_node( name: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1153,12 +1199,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_get_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNodeResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1214,6 +1262,7 @@ impl Node { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_get_node_with_path( name: &str, path: &str, @@ -1233,12 +1282,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_get_node_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNodeWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNodeWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1290,6 +1341,7 @@ impl Node { /// * `name` /// /// name of the Node + #[cfg(feature = "api")] pub fn proxy_patch_node( name: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1307,12 +1359,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_patch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNodeResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1368,6 +1422,7 @@ impl Node { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_patch_node_with_path( name: &str, path: &str, @@ -1387,12 +1442,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_patch_node_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNodeWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNodeWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1444,6 +1501,7 @@ impl Node { /// * `name` /// /// name of the Node + #[cfg(feature = "api")] pub fn proxy_post_node( name: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1461,12 +1519,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_post_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNodeResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1522,6 +1582,7 @@ impl Node { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_post_node_with_path( name: &str, path: &str, @@ -1541,12 +1602,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_post_node_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNodeWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNodeWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1598,6 +1661,7 @@ impl Node { /// * `name` /// /// name of the Node + #[cfg(feature = "api")] pub fn proxy_put_node( name: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1615,12 +1679,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_put_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNodeResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1676,6 +1742,7 @@ impl Node { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_put_node_with_path( name: &str, path: &str, @@ -1695,12 +1762,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::proxy_put_node_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNodeWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNodeWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1756,6 +1825,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node( name: &str, optional: ReadNodeOptional<'_>, @@ -1790,6 +1860,7 @@ impl Node { } /// Optional parameters of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1801,12 +1872,14 @@ pub struct ReadNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeResponse { Ok(crate::v1_9::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1852,6 +1925,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_node_status( name: &str, optional: ReadNodeStatusOptional<'_>, @@ -1878,6 +1952,7 @@ impl Node { } /// Optional parameters of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1885,12 +1960,14 @@ pub struct ReadNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::read_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNodeStatusResponse { Ok(crate::v1_9::api::core::v1::Node), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1938,6 +2015,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node( name: &str, body: &crate::v1_9::api::core::v1::Node, @@ -1966,6 +2044,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -1973,6 +2052,7 @@ pub struct ReplaceNodeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeResponse { Ok(crate::v1_9::api::core::v1::Node), @@ -1980,6 +2060,7 @@ pub enum ReplaceNodeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2035,6 +2116,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_node_status( name: &str, body: &crate::v1_9::api::core::v1::Node, @@ -2063,6 +2145,7 @@ impl Node { } /// Optional parameters of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNodeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2070,6 +2153,7 @@ pub struct ReplaceNodeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::replace_node_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNodeStatusResponse { Ok(crate::v1_9::api::core::v1::Node), @@ -2077,6 +2161,7 @@ pub enum ReplaceNodeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNodeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2128,6 +2213,7 @@ impl Node { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_node( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2146,12 +2232,14 @@ impl Node { } /// Use `::try_from_parts` to parse the HTTP response body of [`Node::watch_node`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNodeResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNodeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/persistent_volume.rs b/src/v1_9/api/core/v1/persistent_volume.rs index 7225ac9c5f..1965223a49 100644 --- a/src/v1_9/api/core/v1/persistent_volume.rs +++ b/src/v1_9/api/core/v1/persistent_volume.rs @@ -29,6 +29,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_persistent_volume( body: &crate::v1_9::api::core::v1::PersistentVolume, optional: CreatePersistentVolumeOptional<'_>, @@ -54,6 +55,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePersistentVolumeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreatePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::create_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePersistentVolumeResponse { Ok(crate::v1_9::api::core::v1::PersistentVolume), @@ -69,6 +72,7 @@ pub enum CreatePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl PersistentVolume { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_persistent_volume( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -150,6 +155,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_collection_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPersistentVolumeResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -157,6 +163,7 @@ pub enum DeleteCollectionPersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -215,6 +222,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_persistent_volume( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -234,6 +242,7 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::delete_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePersistentVolumeResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeletePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::list_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeResponse { Ok(crate::v1_9::api::core::v1::PersistentVolumeList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeResponse { Ok(crate::v1_9::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_persistent_volume_status( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -475,12 +492,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::patch_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPersistentVolumeStatusResponse { Ok(crate::v1_9::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -526,6 +545,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume( name: &str, optional: ReadPersistentVolumeOptional<'_>, @@ -560,6 +580,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -571,12 +592,14 @@ pub struct ReadPersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeResponse { Ok(crate::v1_9::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -622,6 +645,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_persistent_volume_status( name: &str, optional: ReadPersistentVolumeStatusOptional<'_>, @@ -648,6 +672,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -655,12 +680,14 @@ pub struct ReadPersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::read_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPersistentVolumeStatusResponse { Ok(crate::v1_9::api::core::v1::PersistentVolume), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -708,6 +735,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume( name: &str, body: &crate::v1_9::api::core::v1::PersistentVolume, @@ -736,6 +764,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeOptional<'a> { /// If 'true', then the output is pretty printed. @@ -743,6 +772,7 @@ pub struct ReplacePersistentVolumeOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeResponse { Ok(crate::v1_9::api::core::v1::PersistentVolume), @@ -750,6 +780,7 @@ pub enum ReplacePersistentVolumeResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -805,6 +836,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_persistent_volume_status( name: &str, body: &crate::v1_9::api::core::v1::PersistentVolume, @@ -833,6 +865,7 @@ impl PersistentVolume { } /// Optional parameters of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePersistentVolumeStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -840,6 +873,7 @@ pub struct ReplacePersistentVolumeStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::replace_persistent_volume_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePersistentVolumeStatusResponse { Ok(crate::v1_9::api::core::v1::PersistentVolume), @@ -847,6 +881,7 @@ pub enum ReplacePersistentVolumeStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePersistentVolumeStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -898,6 +933,7 @@ impl PersistentVolume { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -916,12 +952,14 @@ impl PersistentVolume { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolume::watch_persistent_volume`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/persistent_volume_claim.rs b/src/v1_9/api/core/v1/persistent_volume_claim.rs index cb5c06371c..e245beefb1 100644 --- a/src/v1_9/api/core/v1/persistent_volume_claim.rs +++ b/src/v1_9/api/core/v1/persistent_volume_claim.rs @@ -33,6 +33,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_persistent_volume_claim( namespace: &str, body: &crate::v1_9::api::core::v1::PersistentVolumeClaim, @@ -61,6 +62,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::create_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_9::api::core::v1::PersistentVolumeClaim), @@ -76,6 +79,7 @@ pub enum CreateNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl PersistentVolumeClaim { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_persistent_volume_claim( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_collection_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::delete_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPersistentVolumeClaimResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -342,12 +353,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_9::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_persistent_volume_claim_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::list_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::PersistentVolumeClaimList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_9::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::patch_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_9::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_9::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::read_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_9::api::core::v1::PersistentVolumeClaim), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_9::api::core::v1::PersistentVolumeClaim), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_persistent_volume_claim_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl PersistentVolumeClaim { } /// Optional parameters of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedPersistentVolumeClaimStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::replace_namespaced_persistent_volume_claim_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Ok(crate::v1_9::api::core::v1::PersistentVolumeClaim), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedPersistentVolumeClaimStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPersistentVolumeClaimStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_persistent_volume_claim( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_namespaced_persistent_volume_claim`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPersistentVolumeClaimResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPersistentVolumeClaimResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl PersistentVolumeClaim { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_persistent_volume_claim_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl PersistentVolumeClaim { } /// Use `::try_from_parts` to parse the HTTP response body of [`PersistentVolumeClaim::watch_persistent_volume_claim_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPersistentVolumeClaimForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPersistentVolumeClaimForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/pod.rs b/src/v1_9/api/core/v1/pod.rs index 364ce81f8b..0c06aaa7cd 100644 --- a/src/v1_9/api/core/v1/pod.rs +++ b/src/v1_9/api/core/v1/pod.rs @@ -33,6 +33,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -86,6 +88,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_delete_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -137,6 +141,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_attach( name: &str, namespace: &str, @@ -178,6 +183,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -210,6 +216,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_exec( name: &str, namespace: &str, @@ -255,6 +262,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -289,6 +297,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_portforward( name: &str, namespace: &str, @@ -314,6 +323,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -338,6 +348,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy( name: &str, namespace: &str, @@ -363,6 +374,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -391,6 +403,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -418,6 +431,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_get_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -442,6 +456,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy( name: &str, namespace: &str, @@ -467,6 +482,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -495,6 +511,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -522,6 +539,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_patch_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -546,6 +564,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_attach( name: &str, namespace: &str, @@ -587,6 +606,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_attach`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodAttachOptional<'a> { /// The container in which to execute the command. Defaults to only container if there is only one container in the pod. @@ -619,6 +639,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_exec( name: &str, namespace: &str, @@ -664,6 +685,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_exec`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodExecOptional<'a> { /// Command is the remote command to execute. argv array. Not executed within a shell. @@ -698,6 +720,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_portforward( name: &str, namespace: &str, @@ -723,6 +746,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_portforward`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodPortforwardOptional { /// List of ports to forward Required when using WebSockets @@ -747,6 +771,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy( name: &str, namespace: &str, @@ -772,6 +797,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -800,6 +826,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -827,6 +854,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_post_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -851,6 +879,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy( name: &str, namespace: &str, @@ -876,6 +905,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -904,6 +934,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_pod_proxy_with_path( name: &str, namespace: &str, @@ -931,6 +962,7 @@ impl Pod { } /// Optional parameters of [`Pod::connect_put_namespaced_pod_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedPodProxyWithPathOptional<'a> { /// Path is the URL path to use for the current proxy request to pod. @@ -955,6 +987,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod( namespace: &str, body: &crate::v1_9::api::core::v1::Pod, @@ -983,6 +1016,7 @@ impl Pod { } /// Optional parameters of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodOptional<'a> { /// If 'true', then the output is pretty printed. @@ -990,6 +1024,7 @@ pub struct CreateNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::create_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodResponse { Ok(crate::v1_9::api::core::v1::Pod), @@ -998,6 +1033,7 @@ pub enum CreateNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1063,6 +1099,7 @@ impl Pod { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -1086,6 +1123,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_collection_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -1093,6 +1131,7 @@ pub enum DeleteCollectionNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1155,6 +1194,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod( name: &str, namespace: &str, @@ -1176,6 +1216,7 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::delete_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -1183,6 +1224,7 @@ pub enum DeleteNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1243,6 +1285,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -1264,12 +1307,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodResponse { Ok(crate::v1_9::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1313,6 +1358,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1331,12 +1377,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::list_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::PodList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1388,6 +1436,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod( name: &str, namespace: &str, @@ -1417,12 +1466,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodResponse { Ok(crate::v1_9::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1474,6 +1525,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_status( name: &str, namespace: &str, @@ -1503,12 +1555,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::patch_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodStatusResponse { Ok(crate::v1_9::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1554,6 +1608,7 @@ impl Pod { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_delete_namespaced_pod( name: &str, namespace: &str, @@ -1573,12 +1628,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_delete_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENamespacedPodResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1638,6 +1695,7 @@ impl Pod { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_delete_namespaced_pod_with_path( name: &str, namespace: &str, @@ -1659,12 +1717,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_delete_namespaced_pod_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENamespacedPodWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENamespacedPodWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1720,6 +1780,7 @@ impl Pod { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_get_namespaced_pod( name: &str, namespace: &str, @@ -1739,12 +1800,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_get_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNamespacedPodResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1804,6 +1867,7 @@ impl Pod { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_get_namespaced_pod_with_path( name: &str, namespace: &str, @@ -1825,12 +1889,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_get_namespaced_pod_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNamespacedPodWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNamespacedPodWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1886,6 +1952,7 @@ impl Pod { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_patch_namespaced_pod( name: &str, namespace: &str, @@ -1905,12 +1972,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_patch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNamespacedPodResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1970,6 +2039,7 @@ impl Pod { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_patch_namespaced_pod_with_path( name: &str, namespace: &str, @@ -1991,12 +2061,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_patch_namespaced_pod_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNamespacedPodWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNamespacedPodWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2052,6 +2124,7 @@ impl Pod { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_post_namespaced_pod( name: &str, namespace: &str, @@ -2071,12 +2144,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_post_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNamespacedPodResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2136,6 +2211,7 @@ impl Pod { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_post_namespaced_pod_with_path( name: &str, namespace: &str, @@ -2157,12 +2233,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_post_namespaced_pod_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNamespacedPodWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNamespacedPodWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2218,6 +2296,7 @@ impl Pod { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_put_namespaced_pod( name: &str, namespace: &str, @@ -2237,12 +2316,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_put_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNamespacedPodResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2302,6 +2383,7 @@ impl Pod { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_put_namespaced_pod_with_path( name: &str, namespace: &str, @@ -2323,12 +2405,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::proxy_put_namespaced_pod_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNamespacedPodWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNamespacedPodWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2388,6 +2472,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod( name: &str, namespace: &str, @@ -2424,6 +2509,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -2435,12 +2521,14 @@ pub struct ReadNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodResponse { Ok(crate::v1_9::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2490,6 +2578,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_log( name: &str, namespace: &str, @@ -2546,6 +2635,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodLogOptional<'a> { /// The container for which to stream logs. Defaults to only container if there is one container in the pod. @@ -2567,12 +2657,14 @@ pub struct ReadNamespacedPodLogOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_log`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodLogResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodLogResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2632,6 +2724,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_status( name: &str, namespace: &str, @@ -2660,6 +2753,7 @@ impl Pod { } /// Optional parameters of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2667,12 +2761,14 @@ pub struct ReadNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::read_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodStatusResponse { Ok(crate::v1_9::api::core::v1::Pod), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2724,6 +2820,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod( name: &str, namespace: &str, @@ -2754,6 +2851,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2761,6 +2859,7 @@ pub struct ReplaceNamespacedPodOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodResponse { Ok(crate::v1_9::api::core::v1::Pod), @@ -2768,6 +2867,7 @@ pub enum ReplaceNamespacedPodResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2827,6 +2927,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_status( name: &str, namespace: &str, @@ -2857,6 +2958,7 @@ impl Pod { } /// Optional parameters of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2864,6 +2966,7 @@ pub struct ReplaceNamespacedPodStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::replace_namespaced_pod_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodStatusResponse { Ok(crate::v1_9::api::core::v1::Pod), @@ -2871,6 +2974,7 @@ pub enum ReplaceNamespacedPodStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2926,6 +3030,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -2947,12 +3052,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_namespaced_pod`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2998,6 +3105,7 @@ impl Pod { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -3016,12 +3124,14 @@ impl Pod { } /// Use `::try_from_parts` to parse the HTTP response body of [`Pod::watch_pod_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/pod_template.rs b/src/v1_9/api/core/v1/pod_template.rs index fe90c0cf36..e569b6b933 100644 --- a/src/v1_9/api/core/v1/pod_template.rs +++ b/src/v1_9/api/core/v1/pod_template.rs @@ -30,6 +30,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_template( namespace: &str, body: &crate::v1_9::api::core::v1::PodTemplate, @@ -58,6 +59,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodTemplateOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::create_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodTemplateResponse { Ok(crate::v1_9::api::core::v1::PodTemplate), @@ -73,6 +76,7 @@ pub enum CreateNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl PodTemplate { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_template( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_collection_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodTemplateResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_template( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::delete_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodTemplateResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_template( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -339,12 +350,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodTemplateResponse { Ok(crate::v1_9::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_template_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::list_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodTemplateForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::PodTemplateList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_template( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::patch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodTemplateResponse { Ok(crate::v1_9::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_template( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodTemplateOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::read_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodTemplateResponse { Ok(crate::v1_9::api::core::v1::PodTemplate), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_template( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl PodTemplate { } /// Optional parameters of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodTemplateOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedPodTemplateOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::replace_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodTemplateResponse { Ok(crate::v1_9::api::core::v1::PodTemplate), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedPodTemplateResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -750,6 +777,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_template( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -771,12 +799,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_namespaced_pod_template`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodTemplateResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodTemplateResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl PodTemplate { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_template_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -840,12 +871,14 @@ impl PodTemplate { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodTemplate::watch_pod_template_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodTemplateForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodTemplateForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/replication_controller.rs b/src/v1_9/api/core/v1/replication_controller.rs index 56aa5ee243..ebd11875f6 100644 --- a/src/v1_9/api/core/v1/replication_controller.rs +++ b/src/v1_9/api/core/v1/replication_controller.rs @@ -33,6 +33,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replication_controller( namespace: &str, body: &crate::v1_9::api::core::v1::ReplicationController, @@ -61,6 +62,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicationControllerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::create_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicationControllerResponse { Ok(crate::v1_9::api::core::v1::ReplicationController), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicationController { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replication_controller( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_collection_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicationControllerResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replication_controller( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::delete_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicationControllerResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replication_controller( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicationControllerResponse { Ok(crate::v1_9::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replication_controller_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::list_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicationControllerForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::ReplicationControllerList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerResponse { Ok(crate::v1_9::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::patch_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerStatusResponse { Ok(crate::v1_9::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerResponse { Ok(crate::v1_9::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::read_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerStatusResponse { Ok(crate::v1_9::api::core::v1::ReplicationController), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicationControllerOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerResponse { Ok(crate::v1_9::api::core::v1::ReplicationController), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicationControllerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicationController { } /// Optional parameters of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicationControllerStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::replace_namespaced_replication_controller_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerStatusResponse { Ok(crate::v1_9::api::core::v1::ReplicationController), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicationControllerStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replication_controller( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_namespaced_replication_controller`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicationControllerResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicationControllerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicationController { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replication_controller_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicationController { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicationController::watch_replication_controller_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicationControllerForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicationControllerForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/resource_quota.rs b/src/v1_9/api/core/v1/resource_quota.rs index 4f8f3a40d2..e69cc781af 100644 --- a/src/v1_9/api/core/v1/resource_quota.rs +++ b/src/v1_9/api/core/v1/resource_quota.rs @@ -33,6 +33,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_resource_quota( namespace: &str, body: &crate::v1_9::api::core::v1::ResourceQuota, @@ -61,6 +62,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedResourceQuotaOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::create_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedResourceQuotaResponse { Ok(crate::v1_9::api::core::v1::ResourceQuota), @@ -76,6 +79,7 @@ pub enum CreateNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ResourceQuota { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_resource_quota( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_collection_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedResourceQuotaResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_resource_quota( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::delete_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedResourceQuotaResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_resource_quota( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedResourceQuotaResponse { Ok(crate::v1_9::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_resource_quota_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::list_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListResourceQuotaForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::ResourceQuotaList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaResponse { Ok(crate::v1_9::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::patch_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedResourceQuotaStatusResponse { Ok(crate::v1_9::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaResponse { Ok(crate::v1_9::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::read_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedResourceQuotaStatusResponse { Ok(crate::v1_9::api::core::v1::ResourceQuota), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedResourceQuotaOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaResponse { Ok(crate::v1_9::api::core::v1::ResourceQuota), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedResourceQuotaResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_resource_quota_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ResourceQuota { } /// Optional parameters of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedResourceQuotaStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::replace_namespaced_resource_quota_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedResourceQuotaStatusResponse { Ok(crate::v1_9::api::core::v1::ResourceQuota), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedResourceQuotaStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedResourceQuotaStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_resource_quota( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_namespaced_resource_quota`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedResourceQuotaResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedResourceQuotaResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ResourceQuota { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_resource_quota_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ResourceQuota { } /// Use `::try_from_parts` to parse the HTTP response body of [`ResourceQuota::watch_resource_quota_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchResourceQuotaForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchResourceQuotaForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/secret.rs b/src/v1_9/api/core/v1/secret.rs index a9397ec559..28fac5a78f 100644 --- a/src/v1_9/api/core/v1/secret.rs +++ b/src/v1_9/api/core/v1/secret.rs @@ -36,6 +36,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_secret( namespace: &str, body: &crate::v1_9::api::core::v1::Secret, @@ -64,6 +65,7 @@ impl Secret { } /// Optional parameters of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedSecretOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,6 +73,7 @@ pub struct CreateNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::create_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedSecretResponse { Ok(crate::v1_9::api::core::v1::Secret), @@ -79,6 +82,7 @@ pub enum CreateNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl Secret { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_secret( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -167,6 +172,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_collection_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedSecretResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -174,6 +180,7 @@ pub enum DeleteCollectionNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -236,6 +243,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_secret( name: &str, namespace: &str, @@ -257,6 +265,7 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::delete_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedSecretResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -264,6 +273,7 @@ pub enum DeleteNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -324,6 +334,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_secret( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -345,12 +356,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedSecretResponse { Ok(crate::v1_9::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -394,6 +407,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_secret_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -412,12 +426,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::list_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListSecretForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::SecretList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_secret( name: &str, namespace: &str, @@ -498,12 +515,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::patch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedSecretResponse { Ok(crate::v1_9::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +572,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_secret( name: &str, namespace: &str, @@ -589,6 +609,7 @@ impl Secret { } /// Optional parameters of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedSecretOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -600,12 +621,14 @@ pub struct ReadNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::read_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedSecretResponse { Ok(crate::v1_9::api::core::v1::Secret), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +680,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_secret( name: &str, namespace: &str, @@ -687,6 +711,7 @@ impl Secret { } /// Optional parameters of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedSecretOptional<'a> { /// If 'true', then the output is pretty printed. @@ -694,6 +719,7 @@ pub struct ReplaceNamespacedSecretOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::replace_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedSecretResponse { Ok(crate::v1_9::api::core::v1::Secret), @@ -701,6 +727,7 @@ pub enum ReplaceNamespacedSecretResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -756,6 +783,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_secret( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -777,12 +805,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_namespaced_secret`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedSecretResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedSecretResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -828,6 +858,7 @@ impl Secret { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_secret_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -846,12 +877,14 @@ impl Secret { } /// Use `::try_from_parts` to parse the HTTP response body of [`Secret::watch_secret_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchSecretForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchSecretForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/service.rs b/src/v1_9/api/core/v1/service.rs index 49cf0c5d2a..7bb3d213cf 100644 --- a/src/v1_9/api/core/v1/service.rs +++ b/src/v1_9/api/core/v1/service.rs @@ -33,6 +33,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy( name: &str, namespace: &str, @@ -58,6 +59,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -86,6 +88,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_delete_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -113,6 +116,7 @@ impl Service { } /// Optional parameters of [`Service::connect_delete_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectDeleteNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -137,6 +141,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy( name: &str, namespace: &str, @@ -162,6 +167,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -190,6 +196,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_get_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -217,6 +224,7 @@ impl Service { } /// Optional parameters of [`Service::connect_get_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectGetNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -241,6 +249,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy( name: &str, namespace: &str, @@ -266,6 +275,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -294,6 +304,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_patch_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -321,6 +332,7 @@ impl Service { } /// Optional parameters of [`Service::connect_patch_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPatchNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -345,6 +357,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy( name: &str, namespace: &str, @@ -370,6 +383,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -398,6 +412,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_post_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -425,6 +440,7 @@ impl Service { } /// Optional parameters of [`Service::connect_post_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPostNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -449,6 +465,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy( name: &str, namespace: &str, @@ -474,6 +491,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -502,6 +520,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn connect_put_namespaced_service_proxy_with_path( name: &str, namespace: &str, @@ -529,6 +548,7 @@ impl Service { } /// Optional parameters of [`Service::connect_put_namespaced_service_proxy_with_path`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ConnectPutNamespacedServiceProxyWithPathOptional<'a> { /// Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. @@ -553,6 +573,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service( namespace: &str, body: &crate::v1_9::api::core::v1::Service, @@ -581,6 +602,7 @@ impl Service { } /// Optional parameters of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -588,6 +610,7 @@ pub struct CreateNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::create_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceResponse { Ok(crate::v1_9::api::core::v1::Service), @@ -596,6 +619,7 @@ pub enum CreateNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -661,6 +685,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service( name: &str, namespace: &str, @@ -689,6 +714,7 @@ impl Service { } /// Optional parameters of [`Service::delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct DeleteNamespacedServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -696,6 +722,7 @@ pub struct DeleteNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -703,6 +730,7 @@ pub enum DeleteNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -763,6 +791,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -784,12 +813,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceResponse { Ok(crate::v1_9::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -833,6 +864,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -851,12 +883,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::list_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::ServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -908,6 +942,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service( name: &str, namespace: &str, @@ -937,12 +972,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceResponse { Ok(crate::v1_9::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -994,6 +1031,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_status( name: &str, namespace: &str, @@ -1023,12 +1061,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::patch_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceStatusResponse { Ok(crate::v1_9::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1074,6 +1114,7 @@ impl Service { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_delete_namespaced_service( name: &str, namespace: &str, @@ -1093,12 +1134,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_delete_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENamespacedServiceResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1158,6 +1201,7 @@ impl Service { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_delete_namespaced_service_with_path( name: &str, namespace: &str, @@ -1179,12 +1223,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_delete_namespaced_service_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyDELETENamespacedServiceWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyDELETENamespacedServiceWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1240,6 +1286,7 @@ impl Service { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_get_namespaced_service( name: &str, namespace: &str, @@ -1259,12 +1306,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_get_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNamespacedServiceResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1324,6 +1373,7 @@ impl Service { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_get_namespaced_service_with_path( name: &str, namespace: &str, @@ -1345,12 +1395,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_get_namespaced_service_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyGETNamespacedServiceWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyGETNamespacedServiceWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1406,6 +1458,7 @@ impl Service { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_patch_namespaced_service( name: &str, namespace: &str, @@ -1425,12 +1478,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_patch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNamespacedServiceResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1490,6 +1545,7 @@ impl Service { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_patch_namespaced_service_with_path( name: &str, namespace: &str, @@ -1511,12 +1567,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_patch_namespaced_service_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPATCHNamespacedServiceWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPATCHNamespacedServiceWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1572,6 +1630,7 @@ impl Service { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_post_namespaced_service( name: &str, namespace: &str, @@ -1591,12 +1650,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_post_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNamespacedServiceResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1656,6 +1717,7 @@ impl Service { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_post_namespaced_service_with_path( name: &str, namespace: &str, @@ -1677,12 +1739,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_post_namespaced_service_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPOSTNamespacedServiceWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPOSTNamespacedServiceWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1738,6 +1802,7 @@ impl Service { /// * `namespace` /// /// object name and auth scope, such as for teams and projects + #[cfg(feature = "api")] pub fn proxy_put_namespaced_service( name: &str, namespace: &str, @@ -1757,12 +1822,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_put_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNamespacedServiceResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1822,6 +1889,7 @@ impl Service { /// * `path` /// /// path to the resource + #[cfg(feature = "api")] pub fn proxy_put_namespaced_service_with_path( name: &str, namespace: &str, @@ -1843,12 +1911,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::proxy_put_namespaced_service_with_path`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ProxyPUTNamespacedServiceWithPathResponse { Ok(String), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ProxyPUTNamespacedServiceWithPathResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1908,6 +1978,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service( name: &str, namespace: &str, @@ -1944,6 +2015,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -1955,12 +2027,14 @@ pub struct ReadNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceResponse { Ok(crate::v1_9::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2010,6 +2084,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_status( name: &str, namespace: &str, @@ -2038,6 +2113,7 @@ impl Service { } /// Optional parameters of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2045,12 +2121,14 @@ pub struct ReadNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::read_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceStatusResponse { Ok(crate::v1_9::api::core::v1::Service), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2102,6 +2180,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service( name: &str, namespace: &str, @@ -2132,6 +2211,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2139,6 +2219,7 @@ pub struct ReplaceNamespacedServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceResponse { Ok(crate::v1_9::api::core::v1::Service), @@ -2146,6 +2227,7 @@ pub enum ReplaceNamespacedServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2205,6 +2287,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_status( name: &str, namespace: &str, @@ -2235,6 +2318,7 @@ impl Service { } /// Optional parameters of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -2242,6 +2326,7 @@ pub struct ReplaceNamespacedServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::replace_namespaced_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceStatusResponse { Ok(crate::v1_9::api::core::v1::Service), @@ -2249,6 +2334,7 @@ pub enum ReplaceNamespacedServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2304,6 +2390,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -2325,12 +2412,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_namespaced_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2376,6 +2465,7 @@ impl Service { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2394,12 +2484,14 @@ impl Service { } /// Use `::try_from_parts` to parse the HTTP response body of [`Service::watch_service_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/core/v1/service_account.rs b/src/v1_9/api/core/v1/service_account.rs index 782dd0b746..eb722c71cb 100644 --- a/src/v1_9/api/core/v1/service_account.rs +++ b/src/v1_9/api/core/v1/service_account.rs @@ -36,6 +36,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_service_account( namespace: &str, body: &crate::v1_9::api::core::v1::ServiceAccount, @@ -64,6 +65,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedServiceAccountOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,6 +73,7 @@ pub struct CreateNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::create_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedServiceAccountResponse { Ok(crate::v1_9::api::core::v1::ServiceAccount), @@ -79,6 +82,7 @@ pub enum CreateNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl ServiceAccount { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_service_account( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -167,6 +172,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_collection_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedServiceAccountResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -174,6 +180,7 @@ pub enum DeleteCollectionNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -236,6 +243,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_service_account( name: &str, namespace: &str, @@ -257,6 +265,7 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::delete_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedServiceAccountResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -264,6 +273,7 @@ pub enum DeleteNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -324,6 +334,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_service_account( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -345,12 +356,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedServiceAccountResponse { Ok(crate::v1_9::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -394,6 +407,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_service_account_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -412,12 +426,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::list_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListServiceAccountForAllNamespacesResponse { Ok(crate::v1_9::api::core::v1::ServiceAccountList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -469,6 +485,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_service_account( name: &str, namespace: &str, @@ -498,12 +515,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::patch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedServiceAccountResponse { Ok(crate::v1_9::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -553,6 +572,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_service_account( name: &str, namespace: &str, @@ -589,6 +609,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedServiceAccountOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -600,12 +621,14 @@ pub struct ReadNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::read_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedServiceAccountResponse { Ok(crate::v1_9::api::core::v1::ServiceAccount), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -657,6 +680,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_service_account( name: &str, namespace: &str, @@ -687,6 +711,7 @@ impl ServiceAccount { } /// Optional parameters of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedServiceAccountOptional<'a> { /// If 'true', then the output is pretty printed. @@ -694,6 +719,7 @@ pub struct ReplaceNamespacedServiceAccountOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::replace_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedServiceAccountResponse { Ok(crate::v1_9::api::core::v1::ServiceAccount), @@ -701,6 +727,7 @@ pub enum ReplaceNamespacedServiceAccountResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -756,6 +783,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_service_account( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -777,12 +805,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_namespaced_service_account`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedServiceAccountResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedServiceAccountResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -828,6 +858,7 @@ impl ServiceAccount { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_service_account_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -846,12 +877,14 @@ impl ServiceAccount { } /// Use `::try_from_parts` to parse the HTTP response body of [`ServiceAccount::watch_service_account_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchServiceAccountForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchServiceAccountForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/events/v1beta1/event.rs b/src/v1_9/api/events/v1beta1/event.rs index 436e181a77..40af67e7db 100644 --- a/src/v1_9/api/events/v1beta1/event.rs +++ b/src/v1_9/api/events/v1beta1/event.rs @@ -68,6 +68,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_event( namespace: &str, body: &crate::v1_9::api::events::v1beta1::Event, @@ -96,6 +97,7 @@ impl Event { } /// Optional parameters of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -103,6 +105,7 @@ pub struct CreateNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::create_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedEventResponse { Ok(crate::v1_9::api::events::v1beta1::Event), @@ -111,6 +114,7 @@ pub enum CreateNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -176,6 +180,7 @@ impl Event { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_event( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -199,6 +204,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_collection_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedEventResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -206,6 +212,7 @@ pub enum DeleteCollectionNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -268,6 +275,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_event( name: &str, namespace: &str, @@ -289,6 +297,7 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::delete_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedEventResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -296,6 +305,7 @@ pub enum DeleteNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -352,6 +362,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_event_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -370,12 +381,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListEventForAllNamespacesResponse { Ok(crate::v1_9::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -423,6 +436,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_event( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -444,12 +458,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::list_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedEventResponse { Ok(crate::v1_9::api::events::v1beta1::EventList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -501,6 +517,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_event( name: &str, namespace: &str, @@ -530,12 +547,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::patch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedEventResponse { Ok(crate::v1_9::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -585,6 +604,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_event( name: &str, namespace: &str, @@ -621,6 +641,7 @@ impl Event { } /// Optional parameters of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedEventOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -632,12 +653,14 @@ pub struct ReadNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::read_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedEventResponse { Ok(crate::v1_9::api::events::v1beta1::Event), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -689,6 +712,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_event( name: &str, namespace: &str, @@ -719,6 +743,7 @@ impl Event { } /// Optional parameters of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedEventOptional<'a> { /// If 'true', then the output is pretty printed. @@ -726,6 +751,7 @@ pub struct ReplaceNamespacedEventOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::replace_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedEventResponse { Ok(crate::v1_9::api::events::v1beta1::Event), @@ -733,6 +759,7 @@ pub enum ReplaceNamespacedEventResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -784,6 +811,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_event_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -802,12 +830,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_event_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchEventForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchEventForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -857,6 +887,7 @@ impl Event { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_event( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -878,12 +909,14 @@ impl Event { } /// Use `::try_from_parts` to parse the HTTP response body of [`Event::watch_namespaced_event`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedEventResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedEventResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/events/v1beta1/mod.rs b/src/v1_9/api/events/v1beta1/mod.rs index 34d0b5bf3a..0029a47de6 100644 --- a/src/v1_9/api/events/v1beta1/mod.rs +++ b/src/v1_9/api/events/v1beta1/mod.rs @@ -1,25 +1,19 @@ mod event; -pub use self::event::{ - Event, - CreateNamespacedEventOptional, CreateNamespacedEventResponse, - DeleteCollectionNamespacedEventResponse, - DeleteNamespacedEventResponse, - ListEventForAllNamespacesResponse, - ListNamespacedEventResponse, - PatchNamespacedEventResponse, - ReadNamespacedEventOptional, ReadNamespacedEventResponse, - ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse, - WatchEventForAllNamespacesResponse, - WatchNamespacedEventResponse, -}; +pub use self::event::Event; +#[cfg(feature = "api")] pub use self::event::{CreateNamespacedEventOptional, CreateNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::DeleteCollectionNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::DeleteNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::ListEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::ListNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::PatchNamespacedEventResponse; +#[cfg(feature = "api")] pub use self::event::{ReadNamespacedEventOptional, ReadNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::{ReplaceNamespacedEventOptional, ReplaceNamespacedEventResponse}; +#[cfg(feature = "api")] pub use self::event::WatchEventForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::event::WatchNamespacedEventResponse; mod event_list; -pub use self::event_list::{ - EventList, -}; +pub use self::event_list::EventList; mod event_series; -pub use self::event_series::{ - EventSeries, -}; +pub use self::event_series::EventSeries; diff --git a/src/v1_9/api/extensions/v1beta1/daemon_set.rs b/src/v1_9/api/extensions/v1beta1/daemon_set.rs index 29040ed9ce..fbc25f80e4 100644 --- a/src/v1_9/api/extensions/v1beta1/daemon_set.rs +++ b/src/v1_9/api/extensions/v1beta1/daemon_set.rs @@ -33,6 +33,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_daemon_set( namespace: &str, body: &crate::v1_9::api::extensions::v1beta1::DaemonSet, @@ -61,6 +62,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::create_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDaemonSetResponse { Ok(crate::v1_9::api::extensions::v1beta1::DaemonSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl DaemonSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_daemon_set( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_collection_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDaemonSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_daemon_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::delete_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDaemonSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_daemon_set_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDaemonSetForAllNamespacesResponse { Ok(crate::v1_9::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_daemon_set( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::list_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDaemonSetResponse { Ok(crate::v1_9::api::extensions::v1beta1::DaemonSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetResponse { Ok(crate::v1_9::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::patch_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDaemonSetStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetResponse { Ok(crate::v1_9::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::read_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDaemonSetStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::DaemonSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDaemonSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetResponse { Ok(crate::v1_9::api::extensions::v1beta1::DaemonSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDaemonSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_daemon_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl DaemonSet { } /// Optional parameters of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDaemonSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::replace_namespaced_daemon_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDaemonSetStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::DaemonSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDaemonSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDaemonSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_daemon_set_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_daemon_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDaemonSetForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDaemonSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl DaemonSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_daemon_set( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl DaemonSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`DaemonSet::watch_namespaced_daemon_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDaemonSetResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDaemonSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/extensions/v1beta1/deployment.rs b/src/v1_9/api/extensions/v1beta1/deployment.rs index edab1e44af..787c725cfc 100644 --- a/src/v1_9/api/extensions/v1beta1/deployment.rs +++ b/src/v1_9/api/extensions/v1beta1/deployment.rs @@ -33,6 +33,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment( namespace: &str, body: &crate::v1_9::api::extensions::v1beta1::Deployment, @@ -61,6 +62,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::create_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentResponse { Ok(crate::v1_9::api::extensions::v1beta1::Deployment), @@ -76,6 +79,7 @@ pub enum CreateNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Deployment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_deployment( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_collection_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedDeploymentResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_deployment( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::delete_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedDeploymentResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_deployment_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListDeploymentForAllNamespacesResponse { Ok(crate::v1_9::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_deployment( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::list_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedDeploymentResponse { Ok(crate::v1_9::api::extensions::v1beta1::DeploymentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentResponse { Ok(crate::v1_9::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::patch_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentResponse { Ok(crate::v1_9::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::read_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::Deployment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedDeploymentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentResponse { Ok(crate::v1_9::api::extensions::v1beta1::Deployment), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedDeploymentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Deployment { } /// Optional parameters of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedDeploymentStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::replace_namespaced_deployment_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::Deployment), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedDeploymentStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_deployment_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_deployment_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchDeploymentForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchDeploymentForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Deployment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_deployment( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Deployment { } /// Use `::try_from_parts` to parse the HTTP response body of [`Deployment::watch_namespaced_deployment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedDeploymentResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedDeploymentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/extensions/v1beta1/deployment_rollback.rs b/src/v1_9/api/extensions/v1beta1/deployment_rollback.rs index 9c71be0a44..b23bd5859d 100644 --- a/src/v1_9/api/extensions/v1beta1/deployment_rollback.rs +++ b/src/v1_9/api/extensions/v1beta1/deployment_rollback.rs @@ -37,6 +37,7 @@ impl DeploymentRollback { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_deployment_rollback( name: &str, namespace: &str, @@ -67,6 +68,7 @@ impl DeploymentRollback { } /// Optional parameters of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedDeploymentRollbackOptional<'a> { /// If 'true', then the output is pretty printed. @@ -74,6 +76,7 @@ pub struct CreateNamespacedDeploymentRollbackOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`DeploymentRollback::create_namespaced_deployment_rollback`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedDeploymentRollbackResponse { Ok(crate::v1_9::api::extensions::v1beta1::DeploymentRollback), @@ -82,6 +85,7 @@ pub enum CreateNamespacedDeploymentRollbackResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedDeploymentRollbackResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/extensions/v1beta1/ingress.rs b/src/v1_9/api/extensions/v1beta1/ingress.rs index 7fc0ee089c..309b0af2f8 100644 --- a/src/v1_9/api/extensions/v1beta1/ingress.rs +++ b/src/v1_9/api/extensions/v1beta1/ingress.rs @@ -33,6 +33,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_ingress( namespace: &str, body: &crate::v1_9::api::extensions::v1beta1::Ingress, @@ -61,6 +62,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedIngressOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::create_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedIngressResponse { Ok(crate::v1_9::api::extensions::v1beta1::Ingress), @@ -76,6 +79,7 @@ pub enum CreateNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl Ingress { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_ingress( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_collection_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedIngressResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_ingress( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::delete_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedIngressResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -317,6 +327,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_ingress_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -335,12 +346,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListIngressForAllNamespacesResponse { Ok(crate::v1_9::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_ingress( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -409,12 +423,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::list_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedIngressResponse { Ok(crate::v1_9::api::extensions::v1beta1::IngressList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressResponse { Ok(crate::v1_9::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_ingress_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::patch_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedIngressStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressResponse { Ok(crate::v1_9::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_ingress_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::read_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedIngressStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::Ingress), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedIngressOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressResponse { Ok(crate::v1_9::api::extensions::v1beta1::Ingress), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedIngressResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_ingress_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl Ingress { } /// Optional parameters of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedIngressStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedIngressStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::replace_namespaced_ingress_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedIngressStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::Ingress), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedIngressStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedIngressStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1028,6 +1066,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_ingress_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1046,12 +1085,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_ingress_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchIngressForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchIngressForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1101,6 +1142,7 @@ impl Ingress { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_ingress( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1122,12 +1164,14 @@ impl Ingress { } /// Use `::try_from_parts` to parse the HTTP response body of [`Ingress::watch_namespaced_ingress`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedIngressResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedIngressResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/extensions/v1beta1/mod.rs b/src/v1_9/api/extensions/v1beta1/mod.rs index 2ed08add27..d6fdd8c7fa 100644 --- a/src/v1_9/api/extensions/v1beta1/mod.rs +++ b/src/v1_9/api/extensions/v1beta1/mod.rs @@ -1,340 +1,236 @@ mod allowed_flex_volume; -pub use self::allowed_flex_volume::{ - AllowedFlexVolume, -}; +pub use self::allowed_flex_volume::AllowedFlexVolume; mod allowed_host_path; -pub use self::allowed_host_path::{ - AllowedHostPath, -}; +pub use self::allowed_host_path::AllowedHostPath; mod daemon_set; -pub use self::daemon_set::{ - DaemonSet, - CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse, - DeleteCollectionNamespacedDaemonSetResponse, - DeleteNamespacedDaemonSetResponse, - ListDaemonSetForAllNamespacesResponse, - ListNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetResponse, - PatchNamespacedDaemonSetStatusResponse, - ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse, - ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse, - ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse, - ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse, - WatchDaemonSetForAllNamespacesResponse, - WatchNamespacedDaemonSetResponse, -}; +pub use self::daemon_set::DaemonSet; +#[cfg(feature = "api")] pub use self::daemon_set::{CreateNamespacedDaemonSetOptional, CreateNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteCollectionNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::DeleteNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::ListNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetResponse; +#[cfg(feature = "api")] pub use self::daemon_set::PatchNamespacedDaemonSetStatusResponse; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetOptional, ReadNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReadNamespacedDaemonSetStatusOptional, ReadNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetOptional, ReplaceNamespacedDaemonSetResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::{ReplaceNamespacedDaemonSetStatusOptional, ReplaceNamespacedDaemonSetStatusResponse}; +#[cfg(feature = "api")] pub use self::daemon_set::WatchDaemonSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::daemon_set::WatchNamespacedDaemonSetResponse; mod daemon_set_condition; -pub use self::daemon_set_condition::{ - DaemonSetCondition, -}; +pub use self::daemon_set_condition::DaemonSetCondition; mod daemon_set_list; -pub use self::daemon_set_list::{ - DaemonSetList, -}; +pub use self::daemon_set_list::DaemonSetList; mod daemon_set_spec; -pub use self::daemon_set_spec::{ - DaemonSetSpec, -}; +pub use self::daemon_set_spec::DaemonSetSpec; mod daemon_set_status; -pub use self::daemon_set_status::{ - DaemonSetStatus, -}; +pub use self::daemon_set_status::DaemonSetStatus; mod daemon_set_update_strategy; -pub use self::daemon_set_update_strategy::{ - DaemonSetUpdateStrategy, -}; +pub use self::daemon_set_update_strategy::DaemonSetUpdateStrategy; mod deployment; -pub use self::deployment::{ - Deployment, - CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse, - DeleteCollectionNamespacedDeploymentResponse, - DeleteNamespacedDeploymentResponse, - ListDeploymentForAllNamespacesResponse, - ListNamespacedDeploymentResponse, - PatchNamespacedDeploymentResponse, - PatchNamespacedDeploymentStatusResponse, - ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse, - ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse, - ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse, - ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse, - WatchDeploymentForAllNamespacesResponse, - WatchNamespacedDeploymentResponse, -}; +pub use self::deployment::Deployment; +#[cfg(feature = "api")] pub use self::deployment::{CreateNamespacedDeploymentOptional, CreateNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::DeleteCollectionNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::DeleteNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::ListDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::ListNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentResponse; +#[cfg(feature = "api")] pub use self::deployment::PatchNamespacedDeploymentStatusResponse; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentOptional, ReadNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReadNamespacedDeploymentStatusOptional, ReadNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentOptional, ReplaceNamespacedDeploymentResponse}; +#[cfg(feature = "api")] pub use self::deployment::{ReplaceNamespacedDeploymentStatusOptional, ReplaceNamespacedDeploymentStatusResponse}; +#[cfg(feature = "api")] pub use self::deployment::WatchDeploymentForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::deployment::WatchNamespacedDeploymentResponse; mod deployment_condition; -pub use self::deployment_condition::{ - DeploymentCondition, -}; +pub use self::deployment_condition::DeploymentCondition; mod deployment_list; -pub use self::deployment_list::{ - DeploymentList, -}; +pub use self::deployment_list::DeploymentList; mod deployment_rollback; -pub use self::deployment_rollback::{ - DeploymentRollback, - CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse, -}; +pub use self::deployment_rollback::DeploymentRollback; +#[cfg(feature = "api")] pub use self::deployment_rollback::{CreateNamespacedDeploymentRollbackOptional, CreateNamespacedDeploymentRollbackResponse}; mod deployment_spec; -pub use self::deployment_spec::{ - DeploymentSpec, -}; +pub use self::deployment_spec::DeploymentSpec; mod deployment_status; -pub use self::deployment_status::{ - DeploymentStatus, -}; +pub use self::deployment_status::DeploymentStatus; mod deployment_strategy; -pub use self::deployment_strategy::{ - DeploymentStrategy, -}; +pub use self::deployment_strategy::DeploymentStrategy; mod fs_group_strategy_options; -pub use self::fs_group_strategy_options::{ - FSGroupStrategyOptions, -}; +pub use self::fs_group_strategy_options::FSGroupStrategyOptions; mod http_ingress_path; -pub use self::http_ingress_path::{ - HTTPIngressPath, -}; +pub use self::http_ingress_path::HTTPIngressPath; mod http_ingress_rule_value; -pub use self::http_ingress_rule_value::{ - HTTPIngressRuleValue, -}; +pub use self::http_ingress_rule_value::HTTPIngressRuleValue; mod host_port_range; -pub use self::host_port_range::{ - HostPortRange, -}; +pub use self::host_port_range::HostPortRange; mod id_range; -pub use self::id_range::{ - IDRange, -}; +pub use self::id_range::IDRange; mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod ingress; -pub use self::ingress::{ - Ingress, - CreateNamespacedIngressOptional, CreateNamespacedIngressResponse, - DeleteCollectionNamespacedIngressResponse, - DeleteNamespacedIngressResponse, - ListIngressForAllNamespacesResponse, - ListNamespacedIngressResponse, - PatchNamespacedIngressResponse, - PatchNamespacedIngressStatusResponse, - ReadNamespacedIngressOptional, ReadNamespacedIngressResponse, - ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse, - ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse, - ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse, - WatchIngressForAllNamespacesResponse, - WatchNamespacedIngressResponse, -}; +pub use self::ingress::Ingress; +#[cfg(feature = "api")] pub use self::ingress::{CreateNamespacedIngressOptional, CreateNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::DeleteCollectionNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::DeleteNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::ListIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::ListNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressResponse; +#[cfg(feature = "api")] pub use self::ingress::PatchNamespacedIngressStatusResponse; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressOptional, ReadNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReadNamespacedIngressStatusOptional, ReadNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressOptional, ReplaceNamespacedIngressResponse}; +#[cfg(feature = "api")] pub use self::ingress::{ReplaceNamespacedIngressStatusOptional, ReplaceNamespacedIngressStatusResponse}; +#[cfg(feature = "api")] pub use self::ingress::WatchIngressForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::ingress::WatchNamespacedIngressResponse; mod ingress_backend; -pub use self::ingress_backend::{ - IngressBackend, -}; +pub use self::ingress_backend::IngressBackend; mod ingress_list; -pub use self::ingress_list::{ - IngressList, -}; +pub use self::ingress_list::IngressList; mod ingress_rule; -pub use self::ingress_rule::{ - IngressRule, -}; +pub use self::ingress_rule::IngressRule; mod ingress_spec; -pub use self::ingress_spec::{ - IngressSpec, -}; +pub use self::ingress_spec::IngressSpec; mod ingress_status; -pub use self::ingress_status::{ - IngressStatus, -}; +pub use self::ingress_status::IngressStatus; mod ingress_tls; -pub use self::ingress_tls::{ - IngressTLS, -}; +pub use self::ingress_tls::IngressTLS; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; mod pod_security_policy; -pub use self::pod_security_policy::{ - PodSecurityPolicy, - CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse, - DeleteCollectionPodSecurityPolicyResponse, - DeletePodSecurityPolicyResponse, - ListPodSecurityPolicyResponse, - PatchPodSecurityPolicyResponse, - ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse, - ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse, - WatchPodSecurityPolicyResponse, -}; +pub use self::pod_security_policy::PodSecurityPolicy; +#[cfg(feature = "api")] pub use self::pod_security_policy::{CreatePodSecurityPolicyOptional, CreatePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeleteCollectionPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::DeletePodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::ListPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::PatchPodSecurityPolicyResponse; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReadPodSecurityPolicyOptional, ReadPodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::{ReplacePodSecurityPolicyOptional, ReplacePodSecurityPolicyResponse}; +#[cfg(feature = "api")] pub use self::pod_security_policy::WatchPodSecurityPolicyResponse; mod pod_security_policy_list; -pub use self::pod_security_policy_list::{ - PodSecurityPolicyList, -}; +pub use self::pod_security_policy_list::PodSecurityPolicyList; mod pod_security_policy_spec; -pub use self::pod_security_policy_spec::{ - PodSecurityPolicySpec, -}; +pub use self::pod_security_policy_spec::PodSecurityPolicySpec; mod replica_set; -pub use self::replica_set::{ - ReplicaSet, - CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse, - DeleteCollectionNamespacedReplicaSetResponse, - DeleteNamespacedReplicaSetResponse, - ListNamespacedReplicaSetResponse, - ListReplicaSetForAllNamespacesResponse, - PatchNamespacedReplicaSetResponse, - PatchNamespacedReplicaSetStatusResponse, - ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse, - ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse, - ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse, - ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse, - WatchNamespacedReplicaSetResponse, - WatchReplicaSetForAllNamespacesResponse, -}; +pub use self::replica_set::ReplicaSet; +#[cfg(feature = "api")] pub use self::replica_set::{CreateNamespacedReplicaSetOptional, CreateNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::DeleteCollectionNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::DeleteNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::ListReplicaSetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::PatchNamespacedReplicaSetStatusResponse; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetOptional, ReadNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReadNamespacedReplicaSetStatusOptional, ReadNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetOptional, ReplaceNamespacedReplicaSetResponse}; +#[cfg(feature = "api")] pub use self::replica_set::{ReplaceNamespacedReplicaSetStatusOptional, ReplaceNamespacedReplicaSetStatusResponse}; +#[cfg(feature = "api")] pub use self::replica_set::WatchNamespacedReplicaSetResponse; +#[cfg(feature = "api")] pub use self::replica_set::WatchReplicaSetForAllNamespacesResponse; mod replica_set_condition; -pub use self::replica_set_condition::{ - ReplicaSetCondition, -}; +pub use self::replica_set_condition::ReplicaSetCondition; mod replica_set_list; -pub use self::replica_set_list::{ - ReplicaSetList, -}; +pub use self::replica_set_list::ReplicaSetList; mod replica_set_spec; -pub use self::replica_set_spec::{ - ReplicaSetSpec, -}; +pub use self::replica_set_spec::ReplicaSetSpec; mod replica_set_status; -pub use self::replica_set_status::{ - ReplicaSetStatus, -}; +pub use self::replica_set_status::ReplicaSetStatus; mod rollback_config; -pub use self::rollback_config::{ - RollbackConfig, -}; +pub use self::rollback_config::RollbackConfig; mod rolling_update_daemon_set; -pub use self::rolling_update_daemon_set::{ - RollingUpdateDaemonSet, -}; +pub use self::rolling_update_daemon_set::RollingUpdateDaemonSet; mod rolling_update_deployment; -pub use self::rolling_update_deployment::{ - RollingUpdateDeployment, -}; +pub use self::rolling_update_deployment::RollingUpdateDeployment; mod run_as_user_strategy_options; -pub use self::run_as_user_strategy_options::{ - RunAsUserStrategyOptions, -}; +pub use self::run_as_user_strategy_options::RunAsUserStrategyOptions; mod se_linux_strategy_options; -pub use self::se_linux_strategy_options::{ - SELinuxStrategyOptions, -}; +pub use self::se_linux_strategy_options::SELinuxStrategyOptions; mod scale; -pub use self::scale::{ - Scale, - PatchNamespacedDeploymentScaleResponse, - PatchNamespacedReplicaSetScaleResponse, - PatchNamespacedReplicationControllerDummyScaleResponse, - ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse, - ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse, - ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse, - ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse, - ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse, - ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse, -}; +pub use self::scale::Scale; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedDeploymentScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicaSetScaleResponse; +#[cfg(feature = "api")] pub use self::scale::PatchNamespacedReplicationControllerDummyScaleResponse; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedDeploymentScaleOptional, ReadNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicaSetScaleOptional, ReadNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReadNamespacedReplicationControllerDummyScaleOptional, ReadNamespacedReplicationControllerDummyScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedDeploymentScaleOptional, ReplaceNamespacedDeploymentScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicaSetScaleOptional, ReplaceNamespacedReplicaSetScaleResponse}; +#[cfg(feature = "api")] pub use self::scale::{ReplaceNamespacedReplicationControllerDummyScaleOptional, ReplaceNamespacedReplicationControllerDummyScaleResponse}; mod scale_spec; -pub use self::scale_spec::{ - ScaleSpec, -}; +pub use self::scale_spec::ScaleSpec; mod scale_status; -pub use self::scale_status::{ - ScaleStatus, -}; +pub use self::scale_status::ScaleStatus; mod supplemental_groups_strategy_options; -pub use self::supplemental_groups_strategy_options::{ - SupplementalGroupsStrategyOptions, -}; +pub use self::supplemental_groups_strategy_options::SupplementalGroupsStrategyOptions; diff --git a/src/v1_9/api/extensions/v1beta1/network_policy.rs b/src/v1_9/api/extensions/v1beta1/network_policy.rs index 784773b913..686464abd3 100644 --- a/src/v1_9/api/extensions/v1beta1/network_policy.rs +++ b/src/v1_9/api/extensions/v1beta1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_9::api::extensions::v1beta1::NetworkPolicy, @@ -58,6 +59,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_9::api::extensions::v1beta1::NetworkPolicy), @@ -73,6 +76,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -339,12 +350,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_9::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_9::api::extensions::v1beta1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_9::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_9::api::extensions::v1beta1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_9::api::extensions::v1beta1::NetworkPolicy), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -750,6 +777,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -771,12 +799,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -840,12 +871,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/extensions/v1beta1/pod_security_policy.rs b/src/v1_9/api/extensions/v1beta1/pod_security_policy.rs index 5331de5414..abbd47b729 100644 --- a/src/v1_9/api/extensions/v1beta1/pod_security_policy.rs +++ b/src/v1_9/api/extensions/v1beta1/pod_security_policy.rs @@ -26,6 +26,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_pod_security_policy( body: &crate::v1_9::api::extensions::v1beta1::PodSecurityPolicy, optional: CreatePodSecurityPolicyOptional<'_>, @@ -51,6 +52,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -58,6 +60,7 @@ pub struct CreatePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::create_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePodSecurityPolicyResponse { Ok(crate::v1_9::api::extensions::v1beta1::PodSecurityPolicy), @@ -66,6 +69,7 @@ pub enum CreatePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -127,6 +131,7 @@ impl PodSecurityPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_pod_security_policy( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -147,6 +152,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_collection_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPodSecurityPolicyResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -154,6 +160,7 @@ pub enum DeleteCollectionPodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -212,6 +219,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_pod_security_policy( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -231,6 +239,7 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::delete_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePodSecurityPolicyResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -238,6 +247,7 @@ pub enum DeletePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -294,6 +304,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_security_policy( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -312,12 +323,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::list_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodSecurityPolicyResponse { Ok(crate::v1_9::api::extensions::v1beta1::PodSecurityPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -365,6 +378,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_pod_security_policy( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -392,12 +406,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::patch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPodSecurityPolicyResponse { Ok(crate::v1_9::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -443,6 +459,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_pod_security_policy( name: &str, optional: ReadPodSecurityPolicyOptional<'_>, @@ -477,6 +494,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPodSecurityPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -488,12 +506,14 @@ pub struct ReadPodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::read_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPodSecurityPolicyResponse { Ok(crate::v1_9::api::extensions::v1beta1::PodSecurityPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -541,6 +561,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_pod_security_policy( name: &str, body: &crate::v1_9::api::extensions::v1beta1::PodSecurityPolicy, @@ -569,6 +590,7 @@ impl PodSecurityPolicy { } /// Optional parameters of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePodSecurityPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -576,6 +598,7 @@ pub struct ReplacePodSecurityPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::replace_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePodSecurityPolicyResponse { Ok(crate::v1_9::api::extensions::v1beta1::PodSecurityPolicy), @@ -583,6 +606,7 @@ pub enum ReplacePodSecurityPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -634,6 +658,7 @@ impl PodSecurityPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_security_policy( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -652,12 +677,14 @@ impl PodSecurityPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodSecurityPolicy::watch_pod_security_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodSecurityPolicyResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodSecurityPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/extensions/v1beta1/replica_set.rs b/src/v1_9/api/extensions/v1beta1/replica_set.rs index 4edb987289..1bd6f299d0 100644 --- a/src/v1_9/api/extensions/v1beta1/replica_set.rs +++ b/src/v1_9/api/extensions/v1beta1/replica_set.rs @@ -33,6 +33,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_replica_set( namespace: &str, body: &crate::v1_9::api::extensions::v1beta1::ReplicaSet, @@ -61,6 +62,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::create_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedReplicaSetResponse { Ok(crate::v1_9::api::extensions::v1beta1::ReplicaSet), @@ -76,6 +79,7 @@ pub enum CreateNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl ReplicaSet { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_replica_set( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_collection_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedReplicaSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_replica_set( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::delete_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedReplicaSetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_replica_set( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -342,12 +353,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedReplicaSetResponse { Ok(crate::v1_9::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_replica_set_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::list_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListReplicaSetForAllNamespacesResponse { Ok(crate::v1_9::api::extensions::v1beta1::ReplicaSetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetResponse { Ok(crate::v1_9::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -552,6 +571,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_status( name: &str, namespace: &str, @@ -581,12 +601,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::patch_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -636,6 +658,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set( name: &str, namespace: &str, @@ -672,6 +695,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -683,12 +707,14 @@ pub struct ReadNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetResponse { Ok(crate::v1_9::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +764,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_status( name: &str, namespace: &str, @@ -766,6 +793,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -773,12 +801,14 @@ pub struct ReadNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::read_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::ReplicaSet), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -830,6 +860,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set( name: &str, namespace: &str, @@ -860,6 +891,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -867,6 +899,7 @@ pub struct ReplaceNamespacedReplicaSetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetResponse { Ok(crate::v1_9::api::extensions::v1beta1::ReplicaSet), @@ -874,6 +907,7 @@ pub enum ReplaceNamespacedReplicaSetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +967,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_status( name: &str, namespace: &str, @@ -963,6 +998,7 @@ impl ReplicaSet { } /// Optional parameters of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -970,6 +1006,7 @@ pub struct ReplaceNamespacedReplicaSetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::replace_namespaced_replica_set_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetStatusResponse { Ok(crate::v1_9::api::extensions::v1beta1::ReplicaSet), @@ -977,6 +1014,7 @@ pub enum ReplaceNamespacedReplicaSetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1032,6 +1070,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_replica_set( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1053,12 +1092,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_namespaced_replica_set`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedReplicaSetResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedReplicaSetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1104,6 +1145,7 @@ impl ReplicaSet { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_replica_set_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1122,12 +1164,14 @@ impl ReplicaSet { } /// Use `::try_from_parts` to parse the HTTP response body of [`ReplicaSet::watch_replica_set_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchReplicaSetForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchReplicaSetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/extensions/v1beta1/scale.rs b/src/v1_9/api/extensions/v1beta1/scale.rs index 861e6621aa..aeac52a6fa 100644 --- a/src/v1_9/api/extensions/v1beta1/scale.rs +++ b/src/v1_9/api/extensions/v1beta1/scale.rs @@ -37,6 +37,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_deployment_scale( name: &str, namespace: &str, @@ -66,12 +67,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -123,6 +126,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -152,12 +156,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicaSetScaleResponse { Ok(crate::v1_9::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -209,6 +215,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -238,12 +245,14 @@ impl Scale { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::patch_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_9::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -293,6 +302,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_deployment_scale( name: &str, namespace: &str, @@ -321,6 +331,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -328,12 +339,14 @@ pub struct ReadNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -383,6 +396,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -411,6 +425,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -418,12 +433,14 @@ pub struct ReadNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicaSetScaleResponse { Ok(crate::v1_9::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -473,6 +490,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -501,6 +519,7 @@ impl Scale { } /// Optional parameters of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -508,12 +527,14 @@ pub struct ReadNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::read_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_9::api::extensions::v1beta1::Scale), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -565,6 +586,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_deployment_scale( name: &str, namespace: &str, @@ -595,6 +617,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -602,6 +625,7 @@ pub struct ReplaceNamespacedDeploymentScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_deployment_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedDeploymentScaleResponse { Ok(crate::v1_9::api::extensions::v1beta1::Scale), @@ -609,6 +633,7 @@ pub enum ReplaceNamespacedDeploymentScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedDeploymentScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +693,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replica_set_scale( name: &str, namespace: &str, @@ -698,6 +724,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -705,6 +732,7 @@ pub struct ReplaceNamespacedReplicaSetScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replica_set_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicaSetScaleResponse { Ok(crate::v1_9::api::extensions::v1beta1::Scale), @@ -712,6 +740,7 @@ pub enum ReplaceNamespacedReplicaSetScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicaSetScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -771,6 +800,7 @@ impl Scale { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_replication_controller_dummy_scale( name: &str, namespace: &str, @@ -801,6 +831,7 @@ impl Scale { } /// Optional parameters of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -808,6 +839,7 @@ pub struct ReplaceNamespacedReplicationControllerDummyScaleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Scale::replace_namespaced_replication_controller_dummy_scale`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Ok(crate::v1_9::api::extensions::v1beta1::Scale), @@ -815,6 +847,7 @@ pub enum ReplaceNamespacedReplicationControllerDummyScaleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedReplicationControllerDummyScaleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/networking/v1/mod.rs b/src/v1_9/api/networking/v1/mod.rs index fcd95f99a8..23233ec53d 100644 --- a/src/v1_9/api/networking/v1/mod.rs +++ b/src/v1_9/api/networking/v1/mod.rs @@ -1,50 +1,34 @@ mod ip_block; -pub use self::ip_block::{ - IPBlock, -}; +pub use self::ip_block::IPBlock; mod network_policy; -pub use self::network_policy::{ - NetworkPolicy, - CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse, - DeleteCollectionNamespacedNetworkPolicyResponse, - DeleteNamespacedNetworkPolicyResponse, - ListNamespacedNetworkPolicyResponse, - ListNetworkPolicyForAllNamespacesResponse, - PatchNamespacedNetworkPolicyResponse, - ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse, - ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse, - WatchNamespacedNetworkPolicyResponse, - WatchNetworkPolicyForAllNamespacesResponse, -}; +pub use self::network_policy::NetworkPolicy; +#[cfg(feature = "api")] pub use self::network_policy::{CreateNamespacedNetworkPolicyOptional, CreateNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::DeleteCollectionNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::DeleteNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::ListNetworkPolicyForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::network_policy::PatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::{ReadNamespacedNetworkPolicyOptional, ReadNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::{ReplaceNamespacedNetworkPolicyOptional, ReplaceNamespacedNetworkPolicyResponse}; +#[cfg(feature = "api")] pub use self::network_policy::WatchNamespacedNetworkPolicyResponse; +#[cfg(feature = "api")] pub use self::network_policy::WatchNetworkPolicyForAllNamespacesResponse; mod network_policy_egress_rule; -pub use self::network_policy_egress_rule::{ - NetworkPolicyEgressRule, -}; +pub use self::network_policy_egress_rule::NetworkPolicyEgressRule; mod network_policy_ingress_rule; -pub use self::network_policy_ingress_rule::{ - NetworkPolicyIngressRule, -}; +pub use self::network_policy_ingress_rule::NetworkPolicyIngressRule; mod network_policy_list; -pub use self::network_policy_list::{ - NetworkPolicyList, -}; +pub use self::network_policy_list::NetworkPolicyList; mod network_policy_peer; -pub use self::network_policy_peer::{ - NetworkPolicyPeer, -}; +pub use self::network_policy_peer::NetworkPolicyPeer; mod network_policy_port; -pub use self::network_policy_port::{ - NetworkPolicyPort, -}; +pub use self::network_policy_port::NetworkPolicyPort; mod network_policy_spec; -pub use self::network_policy_spec::{ - NetworkPolicySpec, -}; +pub use self::network_policy_spec::NetworkPolicySpec; diff --git a/src/v1_9/api/networking/v1/network_policy.rs b/src/v1_9/api/networking/v1/network_policy.rs index 0509538af2..67d54b5e53 100644 --- a/src/v1_9/api/networking/v1/network_policy.rs +++ b/src/v1_9/api/networking/v1/network_policy.rs @@ -30,6 +30,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_network_policy( namespace: &str, body: &crate::v1_9::api::networking::v1::NetworkPolicy, @@ -58,6 +59,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::create_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedNetworkPolicyResponse { Ok(crate::v1_9::api::networking::v1::NetworkPolicy), @@ -73,6 +76,7 @@ pub enum CreateNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl NetworkPolicy { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_network_policy( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_collection_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedNetworkPolicyResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_network_policy( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::delete_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedNetworkPolicyResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_network_policy( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -339,12 +350,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedNetworkPolicyResponse { Ok(crate::v1_9::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_network_policy_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::list_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_9::api::networking::v1::NetworkPolicyList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_network_policy( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::patch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedNetworkPolicyResponse { Ok(crate::v1_9::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_network_policy( name: &str, namespace: &str, @@ -583,6 +603,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedNetworkPolicyOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -594,12 +615,14 @@ pub struct ReadNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::read_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedNetworkPolicyResponse { Ok(crate::v1_9::api::networking::v1::NetworkPolicy), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +674,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_network_policy( name: &str, namespace: &str, @@ -681,6 +705,7 @@ impl NetworkPolicy { } /// Optional parameters of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { /// If 'true', then the output is pretty printed. @@ -688,6 +713,7 @@ pub struct ReplaceNamespacedNetworkPolicyOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::replace_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedNetworkPolicyResponse { Ok(crate::v1_9::api::networking::v1::NetworkPolicy), @@ -695,6 +721,7 @@ pub enum ReplaceNamespacedNetworkPolicyResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -750,6 +777,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_network_policy( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -771,12 +799,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_namespaced_network_policy`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedNetworkPolicyResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedNetworkPolicyResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -822,6 +852,7 @@ impl NetworkPolicy { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_network_policy_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -840,12 +871,14 @@ impl NetworkPolicy { } /// Use `::try_from_parts` to parse the HTTP response body of [`NetworkPolicy::watch_network_policy_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNetworkPolicyForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNetworkPolicyForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/policy/v1beta1/eviction.rs b/src/v1_9/api/policy/v1beta1/eviction.rs index 1677a352ff..dacf33283e 100644 --- a/src/v1_9/api/policy/v1beta1/eviction.rs +++ b/src/v1_9/api/policy/v1beta1/eviction.rs @@ -34,6 +34,7 @@ impl Eviction { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_eviction( name: &str, namespace: &str, @@ -64,6 +65,7 @@ impl Eviction { } /// Optional parameters of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodEvictionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -71,6 +73,7 @@ pub struct CreateNamespacedPodEvictionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Eviction::create_namespaced_pod_eviction`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodEvictionResponse { Ok(crate::v1_9::api::policy::v1beta1::Eviction), @@ -79,6 +82,7 @@ pub enum CreateNamespacedPodEvictionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodEvictionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/policy/v1beta1/mod.rs b/src/v1_9/api/policy/v1beta1/mod.rs index a1078d77e3..a1e37a1980 100644 --- a/src/v1_9/api/policy/v1beta1/mod.rs +++ b/src/v1_9/api/policy/v1beta1/mod.rs @@ -1,39 +1,29 @@ mod eviction; -pub use self::eviction::{ - Eviction, - CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse, -}; +pub use self::eviction::Eviction; +#[cfg(feature = "api")] pub use self::eviction::{CreateNamespacedPodEvictionOptional, CreateNamespacedPodEvictionResponse}; mod pod_disruption_budget; -pub use self::pod_disruption_budget::{ - PodDisruptionBudget, - CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse, - DeleteCollectionNamespacedPodDisruptionBudgetResponse, - DeleteNamespacedPodDisruptionBudgetResponse, - ListNamespacedPodDisruptionBudgetResponse, - ListPodDisruptionBudgetForAllNamespacesResponse, - PatchNamespacedPodDisruptionBudgetResponse, - PatchNamespacedPodDisruptionBudgetStatusResponse, - ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse, - ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse, - ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse, - ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse, - WatchNamespacedPodDisruptionBudgetResponse, - WatchPodDisruptionBudgetForAllNamespacesResponse, -}; +pub use self::pod_disruption_budget::PodDisruptionBudget; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{CreateNamespacedPodDisruptionBudgetOptional, CreateNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteCollectionNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::DeleteNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::ListPodDisruptionBudgetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::PatchNamespacedPodDisruptionBudgetStatusResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetOptional, ReadNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReadNamespacedPodDisruptionBudgetStatusOptional, ReadNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetOptional, ReplaceNamespacedPodDisruptionBudgetResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::{ReplaceNamespacedPodDisruptionBudgetStatusOptional, ReplaceNamespacedPodDisruptionBudgetStatusResponse}; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchNamespacedPodDisruptionBudgetResponse; +#[cfg(feature = "api")] pub use self::pod_disruption_budget::WatchPodDisruptionBudgetForAllNamespacesResponse; mod pod_disruption_budget_list; -pub use self::pod_disruption_budget_list::{ - PodDisruptionBudgetList, -}; +pub use self::pod_disruption_budget_list::PodDisruptionBudgetList; mod pod_disruption_budget_spec; -pub use self::pod_disruption_budget_spec::{ - PodDisruptionBudgetSpec, -}; +pub use self::pod_disruption_budget_spec::PodDisruptionBudgetSpec; mod pod_disruption_budget_status; -pub use self::pod_disruption_budget_status::{ - PodDisruptionBudgetStatus, -}; +pub use self::pod_disruption_budget_status::PodDisruptionBudgetStatus; diff --git a/src/v1_9/api/policy/v1beta1/pod_disruption_budget.rs b/src/v1_9/api/policy/v1beta1/pod_disruption_budget.rs index 42906a8e90..f91374ec3b 100644 --- a/src/v1_9/api/policy/v1beta1/pod_disruption_budget.rs +++ b/src/v1_9/api/policy/v1beta1/pod_disruption_budget.rs @@ -32,6 +32,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_disruption_budget( namespace: &str, body: &crate::v1_9::api::policy::v1beta1::PodDisruptionBudget, @@ -60,6 +61,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -67,6 +69,7 @@ pub struct CreateNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::create_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_9::api::policy::v1beta1::PodDisruptionBudget), @@ -75,6 +78,7 @@ pub enum CreateNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -140,6 +144,7 @@ impl PodDisruptionBudget { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_disruption_budget( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -163,6 +168,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_collection_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -170,6 +176,7 @@ pub enum DeleteCollectionNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -232,6 +239,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -253,6 +261,7 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::delete_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodDisruptionBudgetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -260,6 +269,7 @@ pub enum DeleteNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -320,6 +330,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -341,12 +352,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_9::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -390,6 +403,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_disruption_budget_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -408,12 +422,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::list_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_9::api::policy::v1beta1::PodDisruptionBudgetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -465,6 +481,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -494,12 +511,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_9::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -551,6 +570,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -580,12 +600,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::patch_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_9::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -635,6 +657,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -671,6 +694,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -682,12 +706,14 @@ pub struct ReadNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_9::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -737,6 +763,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -765,6 +792,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -772,12 +800,14 @@ pub struct ReadNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::read_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_9::api::policy::v1beta1::PodDisruptionBudget), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -829,6 +859,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget( name: &str, namespace: &str, @@ -859,6 +890,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -866,6 +898,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_9::api::policy::v1beta1::PodDisruptionBudget), @@ -873,6 +906,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -932,6 +966,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_disruption_budget_status( name: &str, namespace: &str, @@ -962,6 +997,7 @@ impl PodDisruptionBudget { } /// Optional parameters of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -969,6 +1005,7 @@ pub struct ReplaceNamespacedPodDisruptionBudgetStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::replace_namespaced_pod_disruption_budget_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Ok(crate::v1_9::api::policy::v1beta1::PodDisruptionBudget), @@ -976,6 +1013,7 @@ pub enum ReplaceNamespacedPodDisruptionBudgetStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodDisruptionBudgetStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1031,6 +1069,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_disruption_budget( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -1052,12 +1091,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_namespaced_pod_disruption_budget`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodDisruptionBudgetResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodDisruptionBudgetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1103,6 +1144,7 @@ impl PodDisruptionBudget { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_disruption_budget_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -1121,12 +1163,14 @@ impl PodDisruptionBudget { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodDisruptionBudget::watch_pod_disruption_budget_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodDisruptionBudgetForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodDisruptionBudgetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1/cluster_role.rs b/src/v1_9/api/rbac/v1/cluster_role.rs index b331c72ddb..80dca74ce4 100644 --- a/src/v1_9/api/rbac/v1/cluster_role.rs +++ b/src/v1_9/api/rbac/v1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_9::api::rbac::v1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1::ClusterRole), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_9::api::rbac::v1::ClusterRole, @@ -560,6 +581,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1::ClusterRole), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1/cluster_role_binding.rs b/src/v1_9/api/rbac/v1/cluster_role_binding.rs index e6bf22f7a6..94adef8e74 100644 --- a/src/v1_9/api/rbac/v1/cluster_role_binding.rs +++ b/src/v1_9/api/rbac/v1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_9::api::rbac::v1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1::ClusterRoleBinding), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_9::api::rbac::v1::ClusterRoleBinding, @@ -560,6 +581,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1::ClusterRoleBinding), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1/mod.rs b/src/v1_9/api/rbac/v1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_9/api/rbac/v1/mod.rs +++ b/src/v1_9/api/rbac/v1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_9/api/rbac/v1/role.rs b/src/v1_9/api/rbac/v1/role.rs index 49cfb0088b..d76b7ebed2 100644 --- a/src/v1_9/api/rbac/v1/role.rs +++ b/src/v1_9/api/rbac/v1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_9::api::rbac::v1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1::Role), @@ -73,6 +76,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -339,12 +350,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_9::api::rbac::v1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -575,6 +595,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,12 +603,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +662,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -669,6 +693,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,6 +701,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1::Role), @@ -683,6 +709,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +765,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -759,12 +787,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -810,6 +840,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -828,12 +859,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1/role_binding.rs b/src/v1_9/api/rbac/v1/role_binding.rs index 1ebaea5af0..df0cc688f4 100644 --- a/src/v1_9/api/rbac/v1/role_binding.rs +++ b/src/v1_9/api/rbac/v1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_9::api::rbac::v1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1::RoleBinding), @@ -76,6 +79,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -342,12 +353,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_9::api::rbac::v1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -578,6 +598,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -585,12 +606,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -672,6 +696,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -679,6 +704,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1::RoleBinding), @@ -686,6 +712,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +768,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -762,12 +790,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -813,6 +843,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -831,12 +862,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1alpha1/cluster_role.rs b/src/v1_9/api/rbac/v1alpha1/cluster_role.rs index 6a065e7c1a..5d238b38b1 100644 --- a/src/v1_9/api/rbac/v1alpha1/cluster_role.rs +++ b/src/v1_9/api/rbac/v1alpha1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_9::api::rbac::v1alpha1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1alpha1::ClusterRole), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1alpha1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1alpha1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_9::api::rbac::v1alpha1::ClusterRole, @@ -560,6 +581,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1alpha1::ClusterRole), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1alpha1/cluster_role_binding.rs b/src/v1_9/api/rbac/v1alpha1/cluster_role_binding.rs index ec41477e27..4892633f0a 100644 --- a/src/v1_9/api/rbac/v1alpha1/cluster_role_binding.rs +++ b/src/v1_9/api/rbac/v1alpha1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_9::api::rbac::v1alpha1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1alpha1::ClusterRoleBinding), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1alpha1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1alpha1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_9::api::rbac::v1alpha1::ClusterRoleBinding, @@ -560,6 +581,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1alpha1::ClusterRoleBinding), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1alpha1/mod.rs b/src/v1_9/api/rbac/v1alpha1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_9/api/rbac/v1alpha1/mod.rs +++ b/src/v1_9/api/rbac/v1alpha1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_9/api/rbac/v1alpha1/role.rs b/src/v1_9/api/rbac/v1alpha1/role.rs index 3602fe0d88..372bd2ab1f 100644 --- a/src/v1_9/api/rbac/v1alpha1/role.rs +++ b/src/v1_9/api/rbac/v1alpha1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_9::api::rbac::v1alpha1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1alpha1::Role), @@ -73,6 +76,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -339,12 +350,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_9::api::rbac::v1alpha1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -575,6 +595,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,12 +603,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1alpha1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +662,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -669,6 +693,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,6 +701,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1alpha1::Role), @@ -683,6 +709,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +765,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -759,12 +787,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -810,6 +840,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -828,12 +859,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1alpha1/role_binding.rs b/src/v1_9/api/rbac/v1alpha1/role_binding.rs index 9993cda771..729e811300 100644 --- a/src/v1_9/api/rbac/v1alpha1/role_binding.rs +++ b/src/v1_9/api/rbac/v1alpha1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_9::api::rbac::v1alpha1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1alpha1::RoleBinding), @@ -76,6 +79,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -342,12 +353,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_9::api::rbac::v1alpha1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -578,6 +598,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -585,12 +606,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1alpha1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -672,6 +696,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -679,6 +704,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1alpha1::RoleBinding), @@ -686,6 +712,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +768,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -762,12 +790,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -813,6 +843,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -831,12 +862,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1beta1/cluster_role.rs b/src/v1_9/api/rbac/v1beta1/cluster_role.rs index 731bf29719..8300b3784e 100644 --- a/src/v1_9/api/rbac/v1beta1/cluster_role.rs +++ b/src/v1_9/api/rbac/v1beta1/cluster_role.rs @@ -29,6 +29,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role( body: &crate::v1_9::api::rbac::v1beta1::ClusterRole, optional: CreateClusterRoleOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::create_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1beta1::ClusterRole), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRole { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::delete_collection_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::list_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1beta1::ClusterRoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::patch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role( name: &str, optional: ReadClusterRoleOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::read_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1beta1::ClusterRole), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role( name: &str, body: &crate::v1_9::api::rbac::v1beta1::ClusterRole, @@ -560,6 +581,7 @@ impl ClusterRole { } /// Optional parameters of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::replace_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleResponse { Ok(crate::v1_9::api::rbac::v1beta1::ClusterRole), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRole { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRole { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRole::watch_cluster_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1beta1/cluster_role_binding.rs b/src/v1_9/api/rbac/v1beta1/cluster_role_binding.rs index ab75588126..21d26a8639 100644 --- a/src/v1_9/api/rbac/v1beta1/cluster_role_binding.rs +++ b/src/v1_9/api/rbac/v1beta1/cluster_role_binding.rs @@ -29,6 +29,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_cluster_role_binding( body: &crate::v1_9::api::rbac::v1beta1::ClusterRoleBinding, optional: CreateClusterRoleBindingOptional<'_>, @@ -54,6 +55,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -61,6 +63,7 @@ pub struct CreateClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::create_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1beta1::ClusterRoleBinding), @@ -69,6 +72,7 @@ pub enum CreateClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -130,6 +134,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_cluster_role_binding( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -149,6 +154,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteClusterRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl ClusterRoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_cluster_role_binding( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -234,6 +242,7 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::delete_collection_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionClusterRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -241,6 +250,7 @@ pub enum DeleteCollectionClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +307,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_cluster_role_binding( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -315,12 +326,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::list_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1beta1::ClusterRoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -368,6 +381,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_cluster_role_binding( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -395,12 +409,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::patch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -446,6 +462,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_cluster_role_binding( name: &str, optional: ReadClusterRoleBindingOptional<'_>, @@ -472,6 +489,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -479,12 +497,14 @@ pub struct ReadClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::read_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1beta1::ClusterRoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -532,6 +552,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_cluster_role_binding( name: &str, body: &crate::v1_9::api::rbac::v1beta1::ClusterRoleBinding, @@ -560,6 +581,7 @@ impl ClusterRoleBinding { } /// Optional parameters of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceClusterRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -567,6 +589,7 @@ pub struct ReplaceClusterRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::replace_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceClusterRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1beta1::ClusterRoleBinding), @@ -574,6 +597,7 @@ pub enum ReplaceClusterRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -625,6 +649,7 @@ impl ClusterRoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_cluster_role_binding( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -643,12 +668,14 @@ impl ClusterRoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`ClusterRoleBinding::watch_cluster_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchClusterRoleBindingResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchClusterRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1beta1/mod.rs b/src/v1_9/api/rbac/v1beta1/mod.rs index 898f072d79..d850fe9076 100644 --- a/src/v1_9/api/rbac/v1beta1/mod.rs +++ b/src/v1_9/api/rbac/v1beta1/mod.rs @@ -1,96 +1,72 @@ mod aggregation_rule; -pub use self::aggregation_rule::{ - AggregationRule, -}; +pub use self::aggregation_rule::AggregationRule; mod cluster_role; -pub use self::cluster_role::{ - ClusterRole, - CreateClusterRoleOptional, CreateClusterRoleResponse, - DeleteClusterRoleResponse, - DeleteCollectionClusterRoleResponse, - ListClusterRoleResponse, - PatchClusterRoleResponse, - ReadClusterRoleOptional, ReadClusterRoleResponse, - ReplaceClusterRoleOptional, ReplaceClusterRoleResponse, - WatchClusterRoleResponse, -}; +pub use self::cluster_role::ClusterRole; +#[cfg(feature = "api")] pub use self::cluster_role::{CreateClusterRoleOptional, CreateClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::DeleteCollectionClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::ListClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::PatchClusterRoleResponse; +#[cfg(feature = "api")] pub use self::cluster_role::{ReadClusterRoleOptional, ReadClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::{ReplaceClusterRoleOptional, ReplaceClusterRoleResponse}; +#[cfg(feature = "api")] pub use self::cluster_role::WatchClusterRoleResponse; mod cluster_role_binding; -pub use self::cluster_role_binding::{ - ClusterRoleBinding, - CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse, - DeleteClusterRoleBindingResponse, - DeleteCollectionClusterRoleBindingResponse, - ListClusterRoleBindingResponse, - PatchClusterRoleBindingResponse, - ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse, - ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse, - WatchClusterRoleBindingResponse, -}; +pub use self::cluster_role_binding::ClusterRoleBinding; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{CreateClusterRoleBindingOptional, CreateClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::DeleteCollectionClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::ListClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::PatchClusterRoleBindingResponse; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReadClusterRoleBindingOptional, ReadClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::{ReplaceClusterRoleBindingOptional, ReplaceClusterRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::cluster_role_binding::WatchClusterRoleBindingResponse; mod cluster_role_binding_list; -pub use self::cluster_role_binding_list::{ - ClusterRoleBindingList, -}; +pub use self::cluster_role_binding_list::ClusterRoleBindingList; mod cluster_role_list; -pub use self::cluster_role_list::{ - ClusterRoleList, -}; +pub use self::cluster_role_list::ClusterRoleList; mod policy_rule; -pub use self::policy_rule::{ - PolicyRule, -}; +pub use self::policy_rule::PolicyRule; mod role; -pub use self::role::{ - Role, - CreateNamespacedRoleOptional, CreateNamespacedRoleResponse, - DeleteCollectionNamespacedRoleResponse, - DeleteNamespacedRoleResponse, - ListNamespacedRoleResponse, - ListRoleForAllNamespacesResponse, - PatchNamespacedRoleResponse, - ReadNamespacedRoleOptional, ReadNamespacedRoleResponse, - ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse, - WatchNamespacedRoleResponse, - WatchRoleForAllNamespacesResponse, -}; +pub use self::role::Role; +#[cfg(feature = "api")] pub use self::role::{CreateNamespacedRoleOptional, CreateNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::DeleteCollectionNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::DeleteNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::ListRoleForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role::PatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::{ReadNamespacedRoleOptional, ReadNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::{ReplaceNamespacedRoleOptional, ReplaceNamespacedRoleResponse}; +#[cfg(feature = "api")] pub use self::role::WatchNamespacedRoleResponse; +#[cfg(feature = "api")] pub use self::role::WatchRoleForAllNamespacesResponse; mod role_binding; -pub use self::role_binding::{ - RoleBinding, - CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse, - DeleteCollectionNamespacedRoleBindingResponse, - DeleteNamespacedRoleBindingResponse, - ListNamespacedRoleBindingResponse, - ListRoleBindingForAllNamespacesResponse, - PatchNamespacedRoleBindingResponse, - ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse, - ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse, - WatchNamespacedRoleBindingResponse, - WatchRoleBindingForAllNamespacesResponse, -}; +pub use self::role_binding::RoleBinding; +#[cfg(feature = "api")] pub use self::role_binding::{CreateNamespacedRoleBindingOptional, CreateNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::DeleteCollectionNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::DeleteNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::ListRoleBindingForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::role_binding::PatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::{ReadNamespacedRoleBindingOptional, ReadNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::{ReplaceNamespacedRoleBindingOptional, ReplaceNamespacedRoleBindingResponse}; +#[cfg(feature = "api")] pub use self::role_binding::WatchNamespacedRoleBindingResponse; +#[cfg(feature = "api")] pub use self::role_binding::WatchRoleBindingForAllNamespacesResponse; mod role_binding_list; -pub use self::role_binding_list::{ - RoleBindingList, -}; +pub use self::role_binding_list::RoleBindingList; mod role_list; -pub use self::role_list::{ - RoleList, -}; +pub use self::role_list::RoleList; mod role_ref; -pub use self::role_ref::{ - RoleRef, -}; +pub use self::role_ref::RoleRef; mod subject; -pub use self::subject::{ - Subject, -}; +pub use self::subject::Subject; diff --git a/src/v1_9/api/rbac/v1beta1/role.rs b/src/v1_9/api/rbac/v1beta1/role.rs index 476d009f08..6a32c6d160 100644 --- a/src/v1_9/api/rbac/v1beta1/role.rs +++ b/src/v1_9/api/rbac/v1beta1/role.rs @@ -30,6 +30,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role( namespace: &str, body: &crate::v1_9::api::rbac::v1beta1::Role, @@ -58,6 +59,7 @@ impl Role { } /// Optional parameters of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -65,6 +67,7 @@ pub struct CreateNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::create_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1beta1::Role), @@ -73,6 +76,7 @@ pub enum CreateNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +142,7 @@ impl Role { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -161,6 +166,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_collection_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -168,6 +174,7 @@ pub enum DeleteCollectionNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -230,6 +237,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role( name: &str, namespace: &str, @@ -251,6 +259,7 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::delete_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -258,6 +267,7 @@ pub enum DeleteNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -318,6 +328,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -339,12 +350,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -388,6 +401,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -406,12 +420,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::list_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleForAllNamespacesResponse { Ok(crate::v1_9::api::rbac::v1beta1::RoleList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -463,6 +479,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role( name: &str, namespace: &str, @@ -492,12 +509,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::patch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +566,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role( name: &str, namespace: &str, @@ -575,6 +595,7 @@ impl Role { } /// Optional parameters of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,12 +603,14 @@ pub struct ReadNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::read_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1beta1::Role), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +662,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role( name: &str, namespace: &str, @@ -669,6 +693,7 @@ impl Role { } /// Optional parameters of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleOptional<'a> { /// If 'true', then the output is pretty printed. @@ -676,6 +701,7 @@ pub struct ReplaceNamespacedRoleOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::replace_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleResponse { Ok(crate::v1_9::api::rbac::v1beta1::Role), @@ -683,6 +709,7 @@ pub enum ReplaceNamespacedRoleResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -738,6 +765,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -759,12 +787,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_namespaced_role`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -810,6 +840,7 @@ impl Role { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -828,12 +859,14 @@ impl Role { } /// Use `::try_from_parts` to parse the HTTP response body of [`Role::watch_role_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/rbac/v1beta1/role_binding.rs b/src/v1_9/api/rbac/v1beta1/role_binding.rs index 9c9a7771b6..0241f0073f 100644 --- a/src/v1_9/api/rbac/v1beta1/role_binding.rs +++ b/src/v1_9/api/rbac/v1beta1/role_binding.rs @@ -33,6 +33,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_role_binding( namespace: &str, body: &crate::v1_9::api::rbac::v1beta1::RoleBinding, @@ -61,6 +62,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -68,6 +70,7 @@ pub struct CreateNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::create_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1beta1::RoleBinding), @@ -76,6 +79,7 @@ pub enum CreateNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -141,6 +145,7 @@ impl RoleBinding { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_role_binding( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -164,6 +169,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_collection_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -233,6 +240,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_role_binding( name: &str, namespace: &str, @@ -254,6 +262,7 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::delete_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedRoleBindingResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -261,6 +270,7 @@ pub enum DeleteNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -321,6 +331,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_role_binding( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -342,12 +353,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -391,6 +404,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_role_binding_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -409,12 +423,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::list_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListRoleBindingForAllNamespacesResponse { Ok(crate::v1_9::api::rbac::v1beta1::RoleBindingList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -466,6 +482,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_role_binding( name: &str, namespace: &str, @@ -495,12 +512,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::patch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -550,6 +569,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_role_binding( name: &str, namespace: &str, @@ -578,6 +598,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -585,12 +606,14 @@ pub struct ReadNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::read_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1beta1::RoleBinding), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -642,6 +665,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_role_binding( name: &str, namespace: &str, @@ -672,6 +696,7 @@ impl RoleBinding { } /// Optional parameters of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedRoleBindingOptional<'a> { /// If 'true', then the output is pretty printed. @@ -679,6 +704,7 @@ pub struct ReplaceNamespacedRoleBindingOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::replace_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedRoleBindingResponse { Ok(crate::v1_9::api::rbac::v1beta1::RoleBinding), @@ -686,6 +712,7 @@ pub enum ReplaceNamespacedRoleBindingResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -741,6 +768,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_role_binding( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -762,12 +790,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_namespaced_role_binding`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedRoleBindingResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedRoleBindingResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -813,6 +843,7 @@ impl RoleBinding { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_role_binding_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -831,12 +862,14 @@ impl RoleBinding { } /// Use `::try_from_parts` to parse the HTTP response body of [`RoleBinding::watch_role_binding_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchRoleBindingForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchRoleBindingForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/scheduling/v1alpha1/mod.rs b/src/v1_9/api/scheduling/v1alpha1/mod.rs index 1b873b9159..d8d1960546 100644 --- a/src/v1_9/api/scheduling/v1alpha1/mod.rs +++ b/src/v1_9/api/scheduling/v1alpha1/mod.rs @@ -1,18 +1,14 @@ mod priority_class; -pub use self::priority_class::{ - PriorityClass, - CreatePriorityClassOptional, CreatePriorityClassResponse, - DeleteCollectionPriorityClassResponse, - DeletePriorityClassResponse, - ListPriorityClassResponse, - PatchPriorityClassResponse, - ReadPriorityClassOptional, ReadPriorityClassResponse, - ReplacePriorityClassOptional, ReplacePriorityClassResponse, - WatchPriorityClassResponse, -}; +pub use self::priority_class::PriorityClass; +#[cfg(feature = "api")] pub use self::priority_class::{CreatePriorityClassOptional, CreatePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::DeleteCollectionPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::DeletePriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::ListPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::PatchPriorityClassResponse; +#[cfg(feature = "api")] pub use self::priority_class::{ReadPriorityClassOptional, ReadPriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::{ReplacePriorityClassOptional, ReplacePriorityClassResponse}; +#[cfg(feature = "api")] pub use self::priority_class::WatchPriorityClassResponse; mod priority_class_list; -pub use self::priority_class_list::{ - PriorityClassList, -}; +pub use self::priority_class_list::PriorityClassList; diff --git a/src/v1_9/api/scheduling/v1alpha1/priority_class.rs b/src/v1_9/api/scheduling/v1alpha1/priority_class.rs index caf461064f..a72bc5e445 100644 --- a/src/v1_9/api/scheduling/v1alpha1/priority_class.rs +++ b/src/v1_9/api/scheduling/v1alpha1/priority_class.rs @@ -32,6 +32,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_priority_class( body: &crate::v1_9::api::scheduling::v1alpha1::PriorityClass, optional: CreatePriorityClassOptional<'_>, @@ -57,6 +58,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreatePriorityClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -64,6 +66,7 @@ pub struct CreatePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::create_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreatePriorityClassResponse { Ok(crate::v1_9::api::scheduling::v1alpha1::PriorityClass), @@ -72,6 +75,7 @@ pub enum CreatePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreatePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -133,6 +137,7 @@ impl PriorityClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_priority_class( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -153,6 +158,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_collection_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionPriorityClassResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -160,6 +166,7 @@ pub enum DeleteCollectionPriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -218,6 +225,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_priority_class( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -237,6 +245,7 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::delete_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeletePriorityClassResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -244,6 +253,7 @@ pub enum DeletePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeletePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -300,6 +310,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_priority_class( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -318,12 +329,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::list_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPriorityClassResponse { Ok(crate::v1_9::api::scheduling::v1alpha1::PriorityClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -371,6 +384,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_priority_class( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -398,12 +412,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::patch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchPriorityClassResponse { Ok(crate::v1_9::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -449,6 +465,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_priority_class( name: &str, optional: ReadPriorityClassOptional<'_>, @@ -483,6 +500,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadPriorityClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -494,12 +512,14 @@ pub struct ReadPriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::read_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadPriorityClassResponse { Ok(crate::v1_9::api::scheduling::v1alpha1::PriorityClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -547,6 +567,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_priority_class( name: &str, body: &crate::v1_9::api::scheduling::v1alpha1::PriorityClass, @@ -575,6 +596,7 @@ impl PriorityClass { } /// Optional parameters of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplacePriorityClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -582,6 +604,7 @@ pub struct ReplacePriorityClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::replace_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplacePriorityClassResponse { Ok(crate::v1_9::api::scheduling::v1alpha1::PriorityClass), @@ -589,6 +612,7 @@ pub enum ReplacePriorityClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplacePriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -640,6 +664,7 @@ impl PriorityClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_priority_class( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -658,12 +683,14 @@ impl PriorityClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`PriorityClass::watch_priority_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPriorityClassResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPriorityClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/settings/v1alpha1/mod.rs b/src/v1_9/api/settings/v1alpha1/mod.rs index f0ebd9df12..7816e600a8 100644 --- a/src/v1_9/api/settings/v1alpha1/mod.rs +++ b/src/v1_9/api/settings/v1alpha1/mod.rs @@ -1,25 +1,19 @@ mod pod_preset; -pub use self::pod_preset::{ - PodPreset, - CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse, - DeleteCollectionNamespacedPodPresetResponse, - DeleteNamespacedPodPresetResponse, - ListNamespacedPodPresetResponse, - ListPodPresetForAllNamespacesResponse, - PatchNamespacedPodPresetResponse, - ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse, - ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse, - WatchNamespacedPodPresetResponse, - WatchPodPresetForAllNamespacesResponse, -}; +pub use self::pod_preset::PodPreset; +#[cfg(feature = "api")] pub use self::pod_preset::{CreateNamespacedPodPresetOptional, CreateNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteCollectionNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::DeleteNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::ListPodPresetForAllNamespacesResponse; +#[cfg(feature = "api")] pub use self::pod_preset::PatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::{ReadNamespacedPodPresetOptional, ReadNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::{ReplaceNamespacedPodPresetOptional, ReplaceNamespacedPodPresetResponse}; +#[cfg(feature = "api")] pub use self::pod_preset::WatchNamespacedPodPresetResponse; +#[cfg(feature = "api")] pub use self::pod_preset::WatchPodPresetForAllNamespacesResponse; mod pod_preset_list; -pub use self::pod_preset_list::{ - PodPresetList, -}; +pub use self::pod_preset_list::PodPresetList; mod pod_preset_spec; -pub use self::pod_preset_spec::{ - PodPresetSpec, -}; +pub use self::pod_preset_spec::PodPresetSpec; diff --git a/src/v1_9/api/settings/v1alpha1/pod_preset.rs b/src/v1_9/api/settings/v1alpha1/pod_preset.rs index 0ad393943c..789975eeb4 100644 --- a/src/v1_9/api/settings/v1alpha1/pod_preset.rs +++ b/src/v1_9/api/settings/v1alpha1/pod_preset.rs @@ -28,6 +28,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_namespaced_pod_preset( namespace: &str, body: &crate::v1_9::api::settings::v1alpha1::PodPreset, @@ -56,6 +57,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateNamespacedPodPresetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -63,6 +65,7 @@ pub struct CreateNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::create_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateNamespacedPodPresetResponse { Ok(crate::v1_9::api::settings::v1alpha1::PodPreset), @@ -71,6 +74,7 @@ pub enum CreateNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -136,6 +140,7 @@ impl PodPreset { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_namespaced_pod_preset( namespace: &str, delete_optional: crate::v1_9::DeleteOptional<'_>, @@ -159,6 +164,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_collection_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionNamespacedPodPresetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -166,6 +172,7 @@ pub enum DeleteCollectionNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -228,6 +235,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_namespaced_pod_preset( name: &str, namespace: &str, @@ -249,6 +257,7 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::delete_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteNamespacedPodPresetResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -256,6 +265,7 @@ pub enum DeleteNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -316,6 +326,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_namespaced_pod_preset( namespace: &str, optional: crate::v1_9::ListOptional<'_>, @@ -337,12 +348,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListNamespacedPodPresetResponse { Ok(crate::v1_9::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -386,6 +399,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_pod_preset_for_all_namespaces( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -404,12 +418,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::list_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListPodPresetForAllNamespacesResponse { Ok(crate::v1_9::api::settings::v1alpha1::PodPresetList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -461,6 +477,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_namespaced_pod_preset( name: &str, namespace: &str, @@ -490,12 +507,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::patch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchNamespacedPodPresetResponse { Ok(crate::v1_9::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -545,6 +564,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_namespaced_pod_preset( name: &str, namespace: &str, @@ -581,6 +601,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadNamespacedPodPresetOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -592,12 +613,14 @@ pub struct ReadNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::read_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadNamespacedPodPresetResponse { Ok(crate::v1_9::api::settings::v1alpha1::PodPreset), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -649,6 +672,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_namespaced_pod_preset( name: &str, namespace: &str, @@ -679,6 +703,7 @@ impl PodPreset { } /// Optional parameters of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceNamespacedPodPresetOptional<'a> { /// If 'true', then the output is pretty printed. @@ -686,6 +711,7 @@ pub struct ReplaceNamespacedPodPresetOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::replace_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceNamespacedPodPresetResponse { Ok(crate::v1_9::api::settings::v1alpha1::PodPreset), @@ -693,6 +719,7 @@ pub enum ReplaceNamespacedPodPresetResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -748,6 +775,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_namespaced_pod_preset( namespace: &str, optional: crate::v1_9::WatchOptional<'_>, @@ -769,12 +797,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_namespaced_pod_preset`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchNamespacedPodPresetResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchNamespacedPodPresetResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -820,6 +850,7 @@ impl PodPreset { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_pod_preset_for_all_namespaces( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -838,12 +869,14 @@ impl PodPreset { } /// Use `::try_from_parts` to parse the HTTP response body of [`PodPreset::watch_pod_preset_for_all_namespaces`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchPodPresetForAllNamespacesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchPodPresetForAllNamespacesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/storage/v1/mod.rs b/src/v1_9/api/storage/v1/mod.rs index d20d9cc056..0d65688c2d 100644 --- a/src/v1_9/api/storage/v1/mod.rs +++ b/src/v1_9/api/storage/v1/mod.rs @@ -1,18 +1,14 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; diff --git a/src/v1_9/api/storage/v1/storage_class.rs b/src/v1_9/api/storage/v1/storage_class.rs index 35420e73b5..2c07cdced9 100644 --- a/src/v1_9/api/storage/v1/storage_class.rs +++ b/src/v1_9/api/storage/v1/storage_class.rs @@ -43,6 +43,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_9::api::storage::v1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -68,6 +69,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -75,6 +77,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_9::api::storage::v1::StorageClass), @@ -83,6 +86,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -164,6 +169,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -255,6 +264,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -311,6 +321,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -329,12 +340,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_9::api::storage::v1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -382,6 +395,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -409,12 +423,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_9::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -460,6 +476,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -494,6 +511,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -505,12 +523,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_9::api::storage::v1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -558,6 +578,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_9::api::storage::v1::StorageClass, @@ -586,6 +607,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -593,6 +615,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_9::api::storage::v1::StorageClass), @@ -600,6 +623,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +675,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -669,12 +694,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/storage/v1alpha1/mod.rs b/src/v1_9/api/storage/v1alpha1/mod.rs index a5eefeed6c..4b5a7d41ec 100644 --- a/src/v1_9/api/storage/v1alpha1/mod.rs +++ b/src/v1_9/api/storage/v1alpha1/mod.rs @@ -1,38 +1,26 @@ mod volume_attachment; -pub use self::volume_attachment::{ - VolumeAttachment, - CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse, - DeleteCollectionVolumeAttachmentResponse, - DeleteVolumeAttachmentResponse, - ListVolumeAttachmentResponse, - PatchVolumeAttachmentResponse, - ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse, - ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse, - WatchVolumeAttachmentResponse, -}; +pub use self::volume_attachment::VolumeAttachment; +#[cfg(feature = "api")] pub use self::volume_attachment::{CreateVolumeAttachmentOptional, CreateVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteCollectionVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::DeleteVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::ListVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::PatchVolumeAttachmentResponse; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReadVolumeAttachmentOptional, ReadVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::{ReplaceVolumeAttachmentOptional, ReplaceVolumeAttachmentResponse}; +#[cfg(feature = "api")] pub use self::volume_attachment::WatchVolumeAttachmentResponse; mod volume_attachment_list; -pub use self::volume_attachment_list::{ - VolumeAttachmentList, -}; +pub use self::volume_attachment_list::VolumeAttachmentList; mod volume_attachment_source; -pub use self::volume_attachment_source::{ - VolumeAttachmentSource, -}; +pub use self::volume_attachment_source::VolumeAttachmentSource; mod volume_attachment_spec; -pub use self::volume_attachment_spec::{ - VolumeAttachmentSpec, -}; +pub use self::volume_attachment_spec::VolumeAttachmentSpec; mod volume_attachment_status; -pub use self::volume_attachment_status::{ - VolumeAttachmentStatus, -}; +pub use self::volume_attachment_status::VolumeAttachmentStatus; mod volume_error; -pub use self::volume_error::{ - VolumeError, -}; +pub use self::volume_error::VolumeError; diff --git a/src/v1_9/api/storage/v1alpha1/volume_attachment.rs b/src/v1_9/api/storage/v1alpha1/volume_attachment.rs index 55de613069..29e6a483c5 100644 --- a/src/v1_9/api/storage/v1alpha1/volume_attachment.rs +++ b/src/v1_9/api/storage/v1alpha1/volume_attachment.rs @@ -31,6 +31,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_volume_attachment( body: &crate::v1_9::api::storage::v1alpha1::VolumeAttachment, optional: CreateVolumeAttachmentOptional<'_>, @@ -56,6 +57,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateVolumeAttachmentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -63,6 +65,7 @@ pub struct CreateVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::create_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateVolumeAttachmentResponse { Ok(crate::v1_9::api::storage::v1alpha1::VolumeAttachment), @@ -71,6 +74,7 @@ pub enum CreateVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -132,6 +136,7 @@ impl VolumeAttachment { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_volume_attachment( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -152,6 +157,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_collection_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionVolumeAttachmentResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -159,6 +165,7 @@ pub enum DeleteCollectionVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -217,6 +224,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_volume_attachment( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -236,6 +244,7 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::delete_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteVolumeAttachmentResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -243,6 +252,7 @@ pub enum DeleteVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -299,6 +309,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_volume_attachment( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -317,12 +328,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::list_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListVolumeAttachmentResponse { Ok(crate::v1_9::api::storage::v1alpha1::VolumeAttachmentList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -370,6 +383,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_volume_attachment( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -397,12 +411,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::patch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchVolumeAttachmentResponse { Ok(crate::v1_9::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -448,6 +464,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_volume_attachment( name: &str, optional: ReadVolumeAttachmentOptional<'_>, @@ -482,6 +499,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadVolumeAttachmentOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -493,12 +511,14 @@ pub struct ReadVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::read_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadVolumeAttachmentResponse { Ok(crate::v1_9::api::storage::v1alpha1::VolumeAttachment), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -546,6 +566,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_volume_attachment( name: &str, body: &crate::v1_9::api::storage::v1alpha1::VolumeAttachment, @@ -574,6 +595,7 @@ impl VolumeAttachment { } /// Optional parameters of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceVolumeAttachmentOptional<'a> { /// If 'true', then the output is pretty printed. @@ -581,6 +603,7 @@ pub struct ReplaceVolumeAttachmentOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::replace_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceVolumeAttachmentResponse { Ok(crate::v1_9::api::storage::v1alpha1::VolumeAttachment), @@ -588,6 +611,7 @@ pub enum ReplaceVolumeAttachmentResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -639,6 +663,7 @@ impl VolumeAttachment { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_volume_attachment( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -657,12 +682,14 @@ impl VolumeAttachment { } /// Use `::try_from_parts` to parse the HTTP response body of [`VolumeAttachment::watch_volume_attachment`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchVolumeAttachmentResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchVolumeAttachmentResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/api/storage/v1beta1/mod.rs b/src/v1_9/api/storage/v1beta1/mod.rs index d20d9cc056..0d65688c2d 100644 --- a/src/v1_9/api/storage/v1beta1/mod.rs +++ b/src/v1_9/api/storage/v1beta1/mod.rs @@ -1,18 +1,14 @@ mod storage_class; -pub use self::storage_class::{ - StorageClass, - CreateStorageClassOptional, CreateStorageClassResponse, - DeleteCollectionStorageClassResponse, - DeleteStorageClassResponse, - ListStorageClassResponse, - PatchStorageClassResponse, - ReadStorageClassOptional, ReadStorageClassResponse, - ReplaceStorageClassOptional, ReplaceStorageClassResponse, - WatchStorageClassResponse, -}; +pub use self::storage_class::StorageClass; +#[cfg(feature = "api")] pub use self::storage_class::{CreateStorageClassOptional, CreateStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::DeleteCollectionStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::DeleteStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::ListStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::PatchStorageClassResponse; +#[cfg(feature = "api")] pub use self::storage_class::{ReadStorageClassOptional, ReadStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::{ReplaceStorageClassOptional, ReplaceStorageClassResponse}; +#[cfg(feature = "api")] pub use self::storage_class::WatchStorageClassResponse; mod storage_class_list; -pub use self::storage_class_list::{ - StorageClassList, -}; +pub use self::storage_class_list::StorageClassList; diff --git a/src/v1_9/api/storage/v1beta1/storage_class.rs b/src/v1_9/api/storage/v1beta1/storage_class.rs index 1af179c2b5..d407b064e1 100644 --- a/src/v1_9/api/storage/v1beta1/storage_class.rs +++ b/src/v1_9/api/storage/v1beta1/storage_class.rs @@ -43,6 +43,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_storage_class( body: &crate::v1_9::api::storage::v1beta1::StorageClass, optional: CreateStorageClassOptional<'_>, @@ -68,6 +69,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -75,6 +77,7 @@ pub struct CreateStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::create_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateStorageClassResponse { Ok(crate::v1_9::api::storage::v1beta1::StorageClass), @@ -83,6 +86,7 @@ pub enum CreateStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -144,6 +148,7 @@ impl StorageClass { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_storage_class( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -164,6 +169,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_collection_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionStorageClassResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -171,6 +177,7 @@ pub enum DeleteCollectionStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -229,6 +236,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_storage_class( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -248,6 +256,7 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::delete_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteStorageClassResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -255,6 +264,7 @@ pub enum DeleteStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -311,6 +321,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_storage_class( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -329,12 +340,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::list_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListStorageClassResponse { Ok(crate::v1_9::api::storage::v1beta1::StorageClassList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -382,6 +395,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_storage_class( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -409,12 +423,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::patch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchStorageClassResponse { Ok(crate::v1_9::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -460,6 +476,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_storage_class( name: &str, optional: ReadStorageClassOptional<'_>, @@ -494,6 +511,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadStorageClassOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -505,12 +523,14 @@ pub struct ReadStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::read_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadStorageClassResponse { Ok(crate::v1_9::api::storage::v1beta1::StorageClass), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -558,6 +578,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_storage_class( name: &str, body: &crate::v1_9::api::storage::v1beta1::StorageClass, @@ -586,6 +607,7 @@ impl StorageClass { } /// Optional parameters of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceStorageClassOptional<'a> { /// If 'true', then the output is pretty printed. @@ -593,6 +615,7 @@ pub struct ReplaceStorageClassOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::replace_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceStorageClassResponse { Ok(crate::v1_9::api::storage::v1beta1::StorageClass), @@ -600,6 +623,7 @@ pub enum ReplaceStorageClassResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -651,6 +675,7 @@ impl StorageClass { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_storage_class( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -669,12 +694,14 @@ impl StorageClass { } /// Use `::try_from_parts` to parse the HTTP response body of [`StorageClass::watch_storage_class`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchStorageClassResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchStorageClassResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs b/src/v1_9/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs index 31c32bd649..84161caf0e 100644 --- a/src/v1_9/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs +++ b/src/v1_9/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/custom_resource_definition.rs @@ -28,6 +28,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_custom_resource_definition( body: &crate::v1_9::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, optional: CreateCustomResourceDefinitionOptional<'_>, @@ -53,6 +54,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateCustomResourceDefinitionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::create_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateCustomResourceDefinitionResponse { Ok(crate::v1_9::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -68,6 +71,7 @@ pub enum CreateCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -129,6 +133,7 @@ impl CustomResourceDefinition { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_custom_resource_definition( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -149,6 +154,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_collection_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionCustomResourceDefinitionResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -156,6 +162,7 @@ pub enum DeleteCollectionCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -214,6 +221,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_custom_resource_definition( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -233,6 +241,7 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::delete_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCustomResourceDefinitionResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_custom_resource_definition( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::list_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListCustomResourceDefinitionResponse { Ok(crate::v1_9::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinitionList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_custom_resource_definition( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -394,12 +408,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::patch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchCustomResourceDefinitionResponse { Ok(crate::v1_9::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_custom_resource_definition( name: &str, optional: ReadCustomResourceDefinitionOptional<'_>, @@ -479,6 +496,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadCustomResourceDefinitionOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -490,12 +508,14 @@ pub struct ReadCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::read_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadCustomResourceDefinitionResponse { Ok(crate::v1_9::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -543,6 +563,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition( name: &str, body: &crate::v1_9::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -571,6 +592,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionOptional<'a> { /// If 'true', then the output is pretty printed. @@ -578,6 +600,7 @@ pub struct ReplaceCustomResourceDefinitionOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionResponse { Ok(crate::v1_9::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -585,6 +608,7 @@ pub enum ReplaceCustomResourceDefinitionResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -640,6 +664,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_custom_resource_definition_status( name: &str, body: &crate::v1_9::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition, @@ -668,6 +693,7 @@ impl CustomResourceDefinition { } /// Optional parameters of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,6 +701,7 @@ pub struct ReplaceCustomResourceDefinitionStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::replace_custom_resource_definition_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceCustomResourceDefinitionStatusResponse { Ok(crate::v1_9::apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceDefinition), @@ -682,6 +709,7 @@ pub enum ReplaceCustomResourceDefinitionStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceCustomResourceDefinitionStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -733,6 +761,7 @@ impl CustomResourceDefinition { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_custom_resource_definition( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -751,12 +780,14 @@ impl CustomResourceDefinition { } /// Use `::try_from_parts` to parse the HTTP response body of [`CustomResourceDefinition::watch_custom_resource_definition`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchCustomResourceDefinitionResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchCustomResourceDefinitionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs b/src/v1_9/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs index 6ba8e7377f..369bdfc822 100644 --- a/src/v1_9/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs +++ b/src/v1_9/apiextensions_apiserver/pkg/apis/apiextensions/v1beta1/mod.rs @@ -1,74 +1,48 @@ mod custom_resource_definition; -pub use self::custom_resource_definition::{ - CustomResourceDefinition, - CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse, - DeleteCollectionCustomResourceDefinitionResponse, - DeleteCustomResourceDefinitionResponse, - ListCustomResourceDefinitionResponse, - PatchCustomResourceDefinitionResponse, - ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse, - ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse, - ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse, - WatchCustomResourceDefinitionResponse, -}; +pub use self::custom_resource_definition::CustomResourceDefinition; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{CreateCustomResourceDefinitionOptional, CreateCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCollectionCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::DeleteCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::ListCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::PatchCustomResourceDefinitionResponse; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReadCustomResourceDefinitionOptional, ReadCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionOptional, ReplaceCustomResourceDefinitionResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::{ReplaceCustomResourceDefinitionStatusOptional, ReplaceCustomResourceDefinitionStatusResponse}; +#[cfg(feature = "api")] pub use self::custom_resource_definition::WatchCustomResourceDefinitionResponse; mod custom_resource_definition_condition; -pub use self::custom_resource_definition_condition::{ - CustomResourceDefinitionCondition, -}; +pub use self::custom_resource_definition_condition::CustomResourceDefinitionCondition; mod custom_resource_definition_list; -pub use self::custom_resource_definition_list::{ - CustomResourceDefinitionList, -}; +pub use self::custom_resource_definition_list::CustomResourceDefinitionList; mod custom_resource_definition_names; -pub use self::custom_resource_definition_names::{ - CustomResourceDefinitionNames, -}; +pub use self::custom_resource_definition_names::CustomResourceDefinitionNames; mod custom_resource_definition_spec; -pub use self::custom_resource_definition_spec::{ - CustomResourceDefinitionSpec, -}; +pub use self::custom_resource_definition_spec::CustomResourceDefinitionSpec; mod custom_resource_definition_status; -pub use self::custom_resource_definition_status::{ - CustomResourceDefinitionStatus, -}; +pub use self::custom_resource_definition_status::CustomResourceDefinitionStatus; mod custom_resource_validation; -pub use self::custom_resource_validation::{ - CustomResourceValidation, -}; +pub use self::custom_resource_validation::CustomResourceValidation; mod external_documentation; -pub use self::external_documentation::{ - ExternalDocumentation, -}; +pub use self::external_documentation::ExternalDocumentation; mod json; -pub use self::json::{ - JSON, -}; +pub use self::json::JSON; mod json_schema_props; -pub use self::json_schema_props::{ - JSONSchemaProps, -}; +pub use self::json_schema_props::JSONSchemaProps; mod json_schema_props_or_array; -pub use self::json_schema_props_or_array::{ - JSONSchemaPropsOrArray, -}; +pub use self::json_schema_props_or_array::JSONSchemaPropsOrArray; mod json_schema_props_or_bool; -pub use self::json_schema_props_or_bool::{ - JSONSchemaPropsOrBool, -}; +pub use self::json_schema_props_or_bool::JSONSchemaPropsOrBool; mod json_schema_props_or_string_array; -pub use self::json_schema_props_or_string_array::{ - JSONSchemaPropsOrStringArray, -}; +pub use self::json_schema_props_or_string_array::JSONSchemaPropsOrStringArray; diff --git a/src/v1_9/apimachinery/pkg/api/resource/mod.rs b/src/v1_9/apimachinery/pkg/api/resource/mod.rs index 352925b923..629eeca5bc 100644 --- a/src/v1_9/apimachinery/pkg/api/resource/mod.rs +++ b/src/v1_9/apimachinery/pkg/api/resource/mod.rs @@ -1,5 +1,3 @@ mod quantity; -pub use self::quantity::{ - Quantity, -}; +pub use self::quantity::Quantity; diff --git a/src/v1_9/apimachinery/pkg/apis/meta/v1/mod.rs b/src/v1_9/apimachinery/pkg/apis/meta/v1/mod.rs index 9654f201d6..2a0195df45 100644 --- a/src/v1_9/apimachinery/pkg/apis/meta/v1/mod.rs +++ b/src/v1_9/apimachinery/pkg/apis/meta/v1/mod.rs @@ -1,115 +1,69 @@ mod api_group; -pub use self::api_group::{ - APIGroup, -}; +pub use self::api_group::APIGroup; mod api_group_list; -pub use self::api_group_list::{ - APIGroupList, -}; +pub use self::api_group_list::APIGroupList; mod api_resource; -pub use self::api_resource::{ - APIResource, -}; +pub use self::api_resource::APIResource; mod api_resource_list; -pub use self::api_resource_list::{ - APIResourceList, -}; +pub use self::api_resource_list::APIResourceList; mod api_versions; -pub use self::api_versions::{ - APIVersions, -}; +pub use self::api_versions::APIVersions; mod delete_options; -pub use self::delete_options::{ - DeleteOptions, -}; +pub use self::delete_options::DeleteOptions; mod group_version_for_discovery; -pub use self::group_version_for_discovery::{ - GroupVersionForDiscovery, -}; +pub use self::group_version_for_discovery::GroupVersionForDiscovery; mod initializer; -pub use self::initializer::{ - Initializer, -}; +pub use self::initializer::Initializer; mod initializers; -pub use self::initializers::{ - Initializers, -}; +pub use self::initializers::Initializers; mod label_selector; -pub use self::label_selector::{ - LabelSelector, -}; +pub use self::label_selector::LabelSelector; mod label_selector_requirement; -pub use self::label_selector_requirement::{ - LabelSelectorRequirement, -}; +pub use self::label_selector_requirement::LabelSelectorRequirement; mod list_meta; -pub use self::list_meta::{ - ListMeta, -}; +pub use self::list_meta::ListMeta; mod micro_time; -pub use self::micro_time::{ - MicroTime, -}; +pub use self::micro_time::MicroTime; mod object_meta; -pub use self::object_meta::{ - ObjectMeta, -}; +pub use self::object_meta::ObjectMeta; mod owner_reference; -pub use self::owner_reference::{ - OwnerReference, -}; +pub use self::owner_reference::OwnerReference; mod patch; -pub use self::patch::{ - Patch, -}; +pub use self::patch::Patch; mod preconditions; -pub use self::preconditions::{ - Preconditions, -}; +pub use self::preconditions::Preconditions; mod server_address_by_client_cidr; -pub use self::server_address_by_client_cidr::{ - ServerAddressByClientCIDR, -}; +pub use self::server_address_by_client_cidr::ServerAddressByClientCIDR; mod status; -pub use self::status::{ - Status, -}; +pub use self::status::Status; mod status_cause; -pub use self::status_cause::{ - StatusCause, -}; +pub use self::status_cause::StatusCause; mod status_details; -pub use self::status_details::{ - StatusDetails, -}; +pub use self::status_details::StatusDetails; mod time; -pub use self::time::{ - Time, -}; +pub use self::time::Time; mod watch_event; -pub use self::watch_event::{ - WatchEvent, -}; +pub use self::watch_event::WatchEvent; diff --git a/src/v1_9/apimachinery/pkg/runtime/mod.rs b/src/v1_9/apimachinery/pkg/runtime/mod.rs index 8614e1a158..eb2b8c0503 100644 --- a/src/v1_9/apimachinery/pkg/runtime/mod.rs +++ b/src/v1_9/apimachinery/pkg/runtime/mod.rs @@ -1,5 +1,3 @@ mod raw_extension; -pub use self::raw_extension::{ - RawExtension, -}; +pub use self::raw_extension::RawExtension; diff --git a/src/v1_9/apimachinery/pkg/util/intstr/mod.rs b/src/v1_9/apimachinery/pkg/util/intstr/mod.rs index 0d14f602e5..d3f7196121 100644 --- a/src/v1_9/apimachinery/pkg/util/intstr/mod.rs +++ b/src/v1_9/apimachinery/pkg/util/intstr/mod.rs @@ -1,5 +1,3 @@ mod int_or_string; -pub use self::int_or_string::{ - IntOrString, -}; +pub use self::int_or_string::IntOrString; diff --git a/src/v1_9/apimachinery/pkg/version/mod.rs b/src/v1_9/apimachinery/pkg/version/mod.rs index 540fa68d40..f125e577d1 100644 --- a/src/v1_9/apimachinery/pkg/version/mod.rs +++ b/src/v1_9/apimachinery/pkg/version/mod.rs @@ -1,5 +1,3 @@ mod info; -pub use self::info::{ - Info, -}; +pub use self::info::Info; diff --git a/src/v1_9/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs b/src/v1_9/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs index 82806d673f..19039e3fc5 100644 --- a/src/v1_9/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs +++ b/src/v1_9/kube_aggregator/pkg/apis/apiregistration/v1beta1/api_service.rs @@ -28,6 +28,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn create_api_service( body: &crate::v1_9::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, optional: CreateAPIServiceOptional<'_>, @@ -53,6 +54,7 @@ impl APIService { } /// Optional parameters of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct CreateAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -60,6 +62,7 @@ pub struct CreateAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::create_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum CreateAPIServiceResponse { Ok(crate::v1_9::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -68,6 +71,7 @@ pub enum CreateAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for CreateAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -129,6 +133,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_api_service( name: &str, optional: crate::v1_9::DeleteOptional<'_>, @@ -148,6 +153,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteAPIServiceResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -155,6 +161,7 @@ pub enum DeleteAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -213,6 +220,7 @@ impl APIService { /// * `list_optional` /// /// List options. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn delete_collection_api_service( delete_optional: crate::v1_9::DeleteOptional<'_>, list_optional: crate::v1_9::ListOptional<'_>, @@ -233,6 +241,7 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::delete_collection_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum DeleteCollectionAPIServiceResponse { OkStatus(crate::v1_9::apimachinery::pkg::apis::meta::v1::Status), @@ -240,6 +249,7 @@ pub enum DeleteCollectionAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for DeleteCollectionAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -296,6 +306,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn list_api_service( optional: crate::v1_9::ListOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -314,12 +325,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::list_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ListAPIServiceResponse { Ok(crate::v1_9::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIServiceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ListAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -367,6 +380,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn patch_api_service( name: &str, body: &crate::v1_9::apimachinery::pkg::apis::meta::v1::Patch, @@ -394,12 +408,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::patch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum PatchAPIServiceResponse { Ok(crate::v1_9::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for PatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -445,6 +461,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn read_api_service( name: &str, optional: ReadAPIServiceOptional<'_>, @@ -479,6 +496,7 @@ impl APIService { } /// Optional parameters of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReadAPIServiceOptional<'a> { /// Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. @@ -490,12 +508,14 @@ pub struct ReadAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::read_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReadAPIServiceResponse { Ok(crate::v1_9::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReadAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -543,6 +563,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service( name: &str, body: &crate::v1_9::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -571,6 +592,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceOptional<'a> { /// If 'true', then the output is pretty printed. @@ -578,6 +600,7 @@ pub struct ReplaceAPIServiceOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceResponse { Ok(crate::v1_9::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -585,6 +608,7 @@ pub enum ReplaceAPIServiceResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -640,6 +664,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn replace_api_service_status( name: &str, body: &crate::v1_9::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService, @@ -668,6 +693,7 @@ impl APIService { } /// Optional parameters of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Clone, Copy, Debug, Default)] pub struct ReplaceAPIServiceStatusOptional<'a> { /// If 'true', then the output is pretty printed. @@ -675,6 +701,7 @@ pub struct ReplaceAPIServiceStatusOptional<'a> { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::replace_api_service_status`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum ReplaceAPIServiceStatusResponse { Ok(crate::v1_9::kube_aggregator::pkg::apis::apiregistration::v1beta1::APIService), @@ -682,6 +709,7 @@ pub enum ReplaceAPIServiceStatusResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for ReplaceAPIServiceStatusResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -733,6 +761,7 @@ impl APIService { /// * `optional` /// /// Optional parameters. Use `Default::default()` to not pass any. + #[cfg(feature = "api")] pub fn watch_api_service( optional: crate::v1_9::WatchOptional<'_>, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -751,12 +780,14 @@ impl APIService { } /// Use `::try_from_parts` to parse the HTTP response body of [`APIService::watch_api_service`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum WatchAPIServiceResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::WatchEvent), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for WatchAPIServiceResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { diff --git a/src/v1_9/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs b/src/v1_9/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs index 9eb26431b5..33741c4264 100644 --- a/src/v1_9/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs +++ b/src/v1_9/kube_aggregator/pkg/apis/apiregistration/v1beta1/mod.rs @@ -1,39 +1,27 @@ mod api_service; -pub use self::api_service::{ - APIService, - CreateAPIServiceOptional, CreateAPIServiceResponse, - DeleteAPIServiceResponse, - DeleteCollectionAPIServiceResponse, - ListAPIServiceResponse, - PatchAPIServiceResponse, - ReadAPIServiceOptional, ReadAPIServiceResponse, - ReplaceAPIServiceOptional, ReplaceAPIServiceResponse, - ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse, - WatchAPIServiceResponse, -}; +pub use self::api_service::APIService; +#[cfg(feature = "api")] pub use self::api_service::{CreateAPIServiceOptional, CreateAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::DeleteAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::DeleteCollectionAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::ListAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::PatchAPIServiceResponse; +#[cfg(feature = "api")] pub use self::api_service::{ReadAPIServiceOptional, ReadAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceOptional, ReplaceAPIServiceResponse}; +#[cfg(feature = "api")] pub use self::api_service::{ReplaceAPIServiceStatusOptional, ReplaceAPIServiceStatusResponse}; +#[cfg(feature = "api")] pub use self::api_service::WatchAPIServiceResponse; mod api_service_condition; -pub use self::api_service_condition::{ - APIServiceCondition, -}; +pub use self::api_service_condition::APIServiceCondition; mod api_service_list; -pub use self::api_service_list::{ - APIServiceList, -}; +pub use self::api_service_list::APIServiceList; mod api_service_spec; -pub use self::api_service_spec::{ - APIServiceSpec, -}; +pub use self::api_service_spec::APIServiceSpec; mod api_service_status; -pub use self::api_service_status::{ - APIServiceStatus, -}; +pub use self::api_service_status::APIServiceStatus; mod service_reference; -pub use self::service_reference::{ - ServiceReference, -}; +pub use self::service_reference::ServiceReference; diff --git a/src/v1_9/mod.rs b/src/v1_9/mod.rs index 49ed6e8c86..41e5f5ce15 100644 --- a/src/v1_9/mod.rs +++ b/src/v1_9/mod.rs @@ -1,23 +1,15 @@ mod delete_optional; -pub use self::delete_optional::{ - DeleteOptional, -}; +pub use self::delete_optional::DeleteOptional; mod list_optional; -pub use self::list_optional::{ - ListOptional, -}; +pub use self::list_optional::ListOptional; mod patch_optional; -pub use self::patch_optional::{ - PatchOptional, -}; +pub use self::patch_optional::PatchOptional; mod watch_optional; -pub use self::watch_optional::{ - WatchOptional, -}; +pub use self::watch_optional::WatchOptional; pub mod api; @@ -32,6 +24,7 @@ pub mod kube_aggregator; /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAPIVersionsResponse`]`>` constructor, or [`GetAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/".to_owned(); @@ -45,12 +38,14 @@ pub fn get_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAPIVersionsResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroupList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -85,6 +80,7 @@ impl crate::Response for GetAPIVersionsResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationAPIGroupResponse`]`>` constructor, or [`GetAdmissionregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/".to_owned(); @@ -98,12 +94,14 @@ pub fn get_admissionregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -138,6 +136,7 @@ impl crate::Response for GetAdmissionregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1alpha1/".to_owned(); @@ -151,12 +150,14 @@ pub fn get_admissionregistration_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1alpha1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -191,6 +192,7 @@ impl crate::Response for GetAdmissionregistrationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAdmissionregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAdmissionregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_admissionregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/admissionregistration.k8s.io/v1beta1/".to_owned(); @@ -204,12 +206,14 @@ pub fn get_admissionregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_admissionregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAdmissionregistrationV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -244,6 +248,7 @@ impl crate::Response for GetAdmissionregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsAPIGroupResponse`]`>` constructor, or [`GetApiextensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/".to_owned(); @@ -257,12 +262,14 @@ pub fn get_apiextensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -297,6 +304,7 @@ impl crate::Response for GetApiextensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiextensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiextensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiextensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiextensions.k8s.io/v1beta1/".to_owned(); @@ -310,12 +318,14 @@ pub fn get_apiextensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiextensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiextensionsV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -350,6 +360,7 @@ impl crate::Response for GetApiextensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationAPIGroupResponse`]`>` constructor, or [`GetApiregistrationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/".to_owned(); @@ -363,12 +374,14 @@ pub fn get_apiregistration_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -403,6 +416,7 @@ impl crate::Response for GetApiregistrationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetApiregistrationV1beta1APIResourcesResponse`]`>` constructor, or [`GetApiregistrationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apiregistration_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apiregistration.k8s.io/v1beta1/".to_owned(); @@ -416,12 +430,14 @@ pub fn get_apiregistration_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apiregistration_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetApiregistrationV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -456,6 +472,7 @@ impl crate::Response for GetApiregistrationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsAPIGroupResponse`]`>` constructor, or [`GetAppsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/".to_owned(); @@ -469,12 +486,14 @@ pub fn get_apps_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -509,6 +528,7 @@ impl crate::Response for GetAppsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1APIResourcesResponse`]`>` constructor, or [`GetAppsV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1/".to_owned(); @@ -522,12 +542,14 @@ pub fn get_apps_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -562,6 +584,7 @@ impl crate::Response for GetAppsV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta1APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta1/".to_owned(); @@ -575,12 +598,14 @@ pub fn get_apps_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -615,6 +640,7 @@ impl crate::Response for GetAppsV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAppsV1beta2APIResourcesResponse`]`>` constructor, or [`GetAppsV1beta2APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_apps_v1beta2_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/apps/v1beta2/".to_owned(); @@ -628,12 +654,14 @@ pub fn get_apps_v1beta2_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_apps_v1beta2_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAppsV1beta2APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAppsV1beta2APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -668,6 +696,7 @@ impl crate::Response for GetAppsV1beta2APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationAPIGroupResponse`]`>` constructor, or [`GetAuthenticationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/".to_owned(); @@ -681,12 +710,14 @@ pub fn get_authentication_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -721,6 +752,7 @@ impl crate::Response for GetAuthenticationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1/".to_owned(); @@ -734,12 +766,14 @@ pub fn get_authentication_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -774,6 +808,7 @@ impl crate::Response for GetAuthenticationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthenticationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthenticationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authentication_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authentication.k8s.io/v1beta1/".to_owned(); @@ -787,12 +822,14 @@ pub fn get_authentication_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authentication_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthenticationV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -827,6 +864,7 @@ impl crate::Response for GetAuthenticationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationAPIGroupResponse`]`>` constructor, or [`GetAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/".to_owned(); @@ -840,12 +878,14 @@ pub fn get_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -880,6 +920,7 @@ impl crate::Response for GetAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1/".to_owned(); @@ -893,12 +934,14 @@ pub fn get_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -933,6 +976,7 @@ impl crate::Response for GetAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/authorization.k8s.io/v1beta1/".to_owned(); @@ -946,12 +990,14 @@ pub fn get_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -986,6 +1032,7 @@ impl crate::Response for GetAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingAPIGroupResponse`]`>` constructor, or [`GetAutoscalingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/".to_owned(); @@ -999,12 +1046,14 @@ pub fn get_autoscaling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1039,6 +1088,7 @@ impl crate::Response for GetAutoscalingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v1/".to_owned(); @@ -1052,12 +1102,14 @@ pub fn get_autoscaling_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1092,6 +1144,7 @@ impl crate::Response for GetAutoscalingV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetAutoscalingV2beta1APIResourcesResponse`]`>` constructor, or [`GetAutoscalingV2beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_autoscaling_v2beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/autoscaling/v2beta1/".to_owned(); @@ -1105,12 +1158,14 @@ pub fn get_autoscaling_v2beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_autoscaling_v2beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetAutoscalingV2beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1145,6 +1200,7 @@ impl crate::Response for GetAutoscalingV2beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchAPIGroupResponse`]`>` constructor, or [`GetBatchAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/".to_owned(); @@ -1158,12 +1214,14 @@ pub fn get_batch_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1198,6 +1256,7 @@ impl crate::Response for GetBatchAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1APIResourcesResponse`]`>` constructor, or [`GetBatchV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1/".to_owned(); @@ -1211,12 +1270,14 @@ pub fn get_batch_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1251,6 +1312,7 @@ impl crate::Response for GetBatchV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV1beta1APIResourcesResponse`]`>` constructor, or [`GetBatchV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v1beta1/".to_owned(); @@ -1264,12 +1326,14 @@ pub fn get_batch_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1304,6 +1368,7 @@ impl crate::Response for GetBatchV1beta1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetBatchV2alpha1APIResourcesResponse`]`>` constructor, or [`GetBatchV2alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_batch_v2alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/batch/v2alpha1/".to_owned(); @@ -1317,12 +1382,14 @@ pub fn get_batch_v2alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_batch_v2alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetBatchV2alpha1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetBatchV2alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1357,6 +1424,7 @@ impl crate::Response for GetBatchV2alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesAPIGroupResponse`]`>` constructor, or [`GetCertificatesAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/".to_owned(); @@ -1370,12 +1438,14 @@ pub fn get_certificates_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1410,6 +1480,7 @@ impl crate::Response for GetCertificatesAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCertificatesV1beta1APIResourcesResponse`]`>` constructor, or [`GetCertificatesV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_certificates_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/certificates.k8s.io/v1beta1/".to_owned(); @@ -1423,12 +1494,14 @@ pub fn get_certificates_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_certificates_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCertificatesV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1463,6 +1536,7 @@ impl crate::Response for GetCertificatesV1beta1APIResourcesResponse { /// get the code version /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCodeVersionResponse`]`>` constructor, or [`GetCodeVersionResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_code_version( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/version/".to_owned(); @@ -1476,12 +1550,14 @@ pub fn get_code_version( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_code_version`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCodeVersionResponse { Ok(crate::v1_9::apimachinery::pkg::version::Info), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCodeVersionResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1516,6 +1592,7 @@ impl crate::Response for GetCodeVersionResponse { /// get available API versions /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreAPIVersionsResponse`]`>` constructor, or [`GetCoreAPIVersionsResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_api_versions( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/".to_owned(); @@ -1529,12 +1606,14 @@ pub fn get_core_api_versions( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_api_versions`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreAPIVersionsResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIVersions), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreAPIVersionsResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1569,6 +1648,7 @@ impl crate::Response for GetCoreAPIVersionsResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetCoreV1APIResourcesResponse`]`>` constructor, or [`GetCoreV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_core_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/api/v1/".to_owned(); @@ -1582,12 +1662,14 @@ pub fn get_core_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_core_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetCoreV1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetCoreV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1622,6 +1704,7 @@ impl crate::Response for GetCoreV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsAPIGroupResponse`]`>` constructor, or [`GetEventsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/".to_owned(); @@ -1635,12 +1718,14 @@ pub fn get_events_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1675,6 +1760,7 @@ impl crate::Response for GetEventsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetEventsV1beta1APIResourcesResponse`]`>` constructor, or [`GetEventsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_events_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/events.k8s.io/v1beta1/".to_owned(); @@ -1688,12 +1774,14 @@ pub fn get_events_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_events_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetEventsV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetEventsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1728,6 +1816,7 @@ impl crate::Response for GetEventsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsAPIGroupResponse`]`>` constructor, or [`GetExtensionsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/".to_owned(); @@ -1741,12 +1830,14 @@ pub fn get_extensions_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1781,6 +1872,7 @@ impl crate::Response for GetExtensionsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetExtensionsV1beta1APIResourcesResponse`]`>` constructor, or [`GetExtensionsV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_extensions_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/extensions/v1beta1/".to_owned(); @@ -1794,12 +1886,14 @@ pub fn get_extensions_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_extensions_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetExtensionsV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1834,6 +1928,7 @@ impl crate::Response for GetExtensionsV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingAPIGroupResponse`]`>` constructor, or [`GetNetworkingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/".to_owned(); @@ -1847,12 +1942,14 @@ pub fn get_networking_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1887,6 +1984,7 @@ impl crate::Response for GetNetworkingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetNetworkingV1APIResourcesResponse`]`>` constructor, or [`GetNetworkingV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_networking_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/networking.k8s.io/v1/".to_owned(); @@ -1900,12 +1998,14 @@ pub fn get_networking_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_networking_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetNetworkingV1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetNetworkingV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1940,6 +2040,7 @@ impl crate::Response for GetNetworkingV1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyAPIGroupResponse`]`>` constructor, or [`GetPolicyAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/".to_owned(); @@ -1953,12 +2054,14 @@ pub fn get_policy_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -1993,6 +2096,7 @@ impl crate::Response for GetPolicyAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetPolicyV1beta1APIResourcesResponse`]`>` constructor, or [`GetPolicyV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_policy_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/policy/v1beta1/".to_owned(); @@ -2006,12 +2110,14 @@ pub fn get_policy_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_policy_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetPolicyV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetPolicyV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2046,6 +2152,7 @@ impl crate::Response for GetPolicyV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationAPIGroupResponse`]`>` constructor, or [`GetRbacAuthorizationAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/".to_owned(); @@ -2059,12 +2166,14 @@ pub fn get_rbac_authorization_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2099,6 +2208,7 @@ impl crate::Response for GetRbacAuthorizationAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1/".to_owned(); @@ -2112,12 +2222,14 @@ pub fn get_rbac_authorization_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2152,6 +2264,7 @@ impl crate::Response for GetRbacAuthorizationV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1alpha1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1alpha1/".to_owned(); @@ -2165,12 +2278,14 @@ pub fn get_rbac_authorization_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1alpha1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2205,6 +2320,7 @@ impl crate::Response for GetRbacAuthorizationV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetRbacAuthorizationV1beta1APIResourcesResponse`]`>` constructor, or [`GetRbacAuthorizationV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_rbac_authorization_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/rbac.authorization.k8s.io/v1beta1/".to_owned(); @@ -2218,12 +2334,14 @@ pub fn get_rbac_authorization_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_rbac_authorization_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetRbacAuthorizationV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2258,6 +2376,7 @@ impl crate::Response for GetRbacAuthorizationV1beta1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingAPIGroupResponse`]`>` constructor, or [`GetSchedulingAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/".to_owned(); @@ -2271,12 +2390,14 @@ pub fn get_scheduling_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2311,6 +2432,7 @@ impl crate::Response for GetSchedulingAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSchedulingV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSchedulingV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_scheduling_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/scheduling.k8s.io/v1alpha1/".to_owned(); @@ -2324,12 +2446,14 @@ pub fn get_scheduling_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_scheduling_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSchedulingV1alpha1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2364,6 +2488,7 @@ impl crate::Response for GetSchedulingV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsAPIGroupResponse`]`>` constructor, or [`GetSettingsAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/".to_owned(); @@ -2377,12 +2502,14 @@ pub fn get_settings_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2417,6 +2544,7 @@ impl crate::Response for GetSettingsAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetSettingsV1alpha1APIResourcesResponse`]`>` constructor, or [`GetSettingsV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_settings_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/settings.k8s.io/v1alpha1/".to_owned(); @@ -2430,12 +2558,14 @@ pub fn get_settings_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_settings_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetSettingsV1alpha1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2470,6 +2600,7 @@ impl crate::Response for GetSettingsV1alpha1APIResourcesResponse { /// get information of a group /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageAPIGroupResponse`]`>` constructor, or [`GetStorageAPIGroupResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_api_group( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/".to_owned(); @@ -2483,12 +2614,14 @@ pub fn get_storage_api_group( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_api_group`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageAPIGroupResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIGroup), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageAPIGroupResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2523,6 +2656,7 @@ impl crate::Response for GetStorageAPIGroupResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1APIResourcesResponse`]`>` constructor, or [`GetStorageV1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1/".to_owned(); @@ -2536,12 +2670,14 @@ pub fn get_storage_v1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2576,6 +2712,7 @@ impl crate::Response for GetStorageV1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1alpha1APIResourcesResponse`]`>` constructor, or [`GetStorageV1alpha1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1alpha1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1alpha1/".to_owned(); @@ -2589,12 +2726,14 @@ pub fn get_storage_v1alpha1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1alpha1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1alpha1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1alpha1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2629,6 +2768,7 @@ impl crate::Response for GetStorageV1alpha1APIResourcesResponse { /// get available resources /// /// Use the returned [`crate::ResponseBody`]`<`[`GetStorageV1beta1APIResourcesResponse`]`>` constructor, or [`GetStorageV1beta1APIResourcesResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn get_storage_v1beta1_api_resources( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/apis/storage.k8s.io/v1beta1/".to_owned(); @@ -2642,12 +2782,14 @@ pub fn get_storage_v1beta1_api_resources( } /// Use `::try_from_parts` to parse the HTTP response body of [`get_storage_v1beta1_api_resources`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum GetStorageV1beta1APIResourcesResponse { Ok(crate::v1_9::apimachinery::pkg::apis::meta::v1::APIResourceList), Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for GetStorageV1beta1APIResourcesResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2686,6 +2828,7 @@ impl crate::Response for GetStorageV1beta1APIResourcesResponse { /// * `logpath` /// /// path to the log +#[cfg(feature = "api")] pub fn log_file_handler( logpath: &str, ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { @@ -2702,11 +2845,13 @@ pub fn log_file_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code { @@ -2731,6 +2876,7 @@ impl crate::Response for LogFileHandlerResponse { // Generated from operation logFileListHandler /// Use the returned [`crate::ResponseBody`]`<`[`LogFileListHandlerResponse`]`>` constructor, or [`LogFileListHandlerResponse`] directly, to parse the HTTP response. +#[cfg(feature = "api")] pub fn log_file_list_handler( ) -> Result<(http::Request>, fn(http::StatusCode) -> crate::ResponseBody), crate::RequestError> { let __url = "/logs/".to_owned(); @@ -2744,11 +2890,13 @@ pub fn log_file_list_handler( } /// Use `::try_from_parts` to parse the HTTP response body of [`log_file_list_handler`] +#[cfg(feature = "api")] #[derive(Debug)] pub enum LogFileListHandlerResponse { Other(Result, serde_json::Error>), } +#[cfg(feature = "api")] impl crate::Response for LogFileListHandlerResponse { fn try_from_parts(status_code: http::StatusCode, buf: &[u8]) -> Result<(Self, usize), crate::ResponseError> { match status_code {